I'm trying to show that
$$\lim_{n \to \infty} \left[\sum_{k=1}^{n} \frac{1}{k} - \log n\right] = -\int_0^{\infty} e^{-t} \log t \,dt.$$
In other words, I'm trying to show that the above definitions of the Euler-Mascheroni constant $\gamma$ are equivalent.
In another post here (which I can't seem to find now) someone noted that
$$\int_0^{\infty} e^{-t} \log t \,dt = \left.\frac{d}{dx} \int_0^{\infty} t^x e^{-t} \,dt \right|_{x=0} = \Gamma'(1) = \psi(1),$$
where $\psi$ is the digamma function. This may be a good place to start on the right-hand side.
For the left-hand side I was tempted to represent the terms with integrals. It is not hard to show that
$$\sum_{k=1}^{n} \frac{1}{k} = \int_0^1 \frac{1-x^n}{1-x} \,dx,$$
but I'm not sure this gets us anywhere.
Any help would be greatly appreciated.

