Recall the common fact that $\displaystyle \Gamma'(1)=-\gamma$. Note though that

$\displaystyle \displaystyle \Gamma'(x)=\frac{d}{dx}\int_0^{\infty}t^{x-1}e^{-t}\text{ }dt=\int_0^{\infty}\frac{\partial }{\partial x}t^{x-1}e^{-t}\text{ }dt=\int_0^{\infty}t^{x-1}\log(t)e^{-t}\text{ }dt$

and thus

$\displaystyle \displaystyle -\gamma=\int_0^{\infty}\log(t)e^{-t}\text{ }dt=\int_0^1 \log(t)e^{-t}\text{ }dt+\int_1^{\infty}\log(t)e^{-t}\text{ }dt$

integrate by parts in each to get that

$\displaystyle \displaystyle -\gamma=\left((-e^{-t}+1)\log(t)\right)\bigg\mid_0^1-\int_0^1\frac{e^{-t}+1}{t}\text{ }dt+\left(-e^{-t}\log(t)\right)\bigg\mid_1^{\infty}-\int_1^{\infty}\frac{e^{-t}}{t}\text{ }dt$

Note though that both the non-integral evaluations are zero and so we may conclude that

$\displaystyle \displaystyle -\gamma=\int_0^1\frac{e^{-t}-1}{t}\text{ }dt+\int_1^{\infty}\frac{e^{-t}}{t}\text{ }dt$

Multiplying both sides by $\displaystyle -1$ gives the correct result.