TITLE: Why is $-\gamma = \int_0^1 \frac{e^{-z}-1}{z}dz+\int_1^\infty \frac{e^{-z}}{z}dz$
QUESTION [8 upvotes]: It seems like the sum of the two RHS integrals is "well known"$^\dagger$ to be Euler's constant:
$$\gamma \equiv \int_1^\infty \frac{1}{\lfloor z\rfloor} - \frac{1}{z}dz 
\quad\stackrel{?}{=}\quad
-\int_0^1 \frac{e^{-z}-1}{z}dz-\int_1^\infty \frac{e^{-z}}{z}dz$$
How can I prove this is so?
Edit: 
I can prove this converges to a constant by showing that this is equivalent to:
$$\int_0^1 \frac{e^{-1/z}+e^{-z}-1}{z}dz$$
And that the limit as $z\to0$ exists, so the integral converges. This however doesn't bring me closer to proving what this constant is.
$\Tiny^\dagger\text{ From the collected papers of L. Landau. }$

REPLY [8 votes]: Integration by parts on the first integral produces
$$[(1-e^{-z}) \log{z}]_0^{1} -\int_0^1 dz \, e^{-z} \, \log{z} = -\int_0^1 dz \, e^{-z} \, \log{z}$$
Integration by parts on the second integral produces
$$-[e^{-z} \log{z}]_1^{\infty} - \int_1^{\infty}dz \, e^{-z} \, \log{z} =  - \int_1^{\infty}dz \, e^{-z} \, \log{z}$$ 
Putting this together, these integrals sum to
$$-\int_0^{\infty} dz \, e^{-z} \, \log{z} = -\left [\frac{d}{ds} \int_0^{\infty} dz \, e^{-z} \, z^s\right ]_{s=1} = -\left [\frac{d}{ds} \Gamma(s)\right]_{s=1} = -\gamma $$

REPLY [8 votes]: For $\alpha > 0$, write
$$\begin{align}
F(\alpha) &:= \int_0^1 \frac{e^{-z}-1}{z^{1-\alpha}}\,dz + \int_1^\infty \frac{e^{-z}}{z^{1-\alpha}}\,dz\\
&= \int_0^\infty z^{\alpha-1}e^{-z}\,dz - \int_0^1 z^{\alpha-1}\,dz\\
&= \Gamma(\alpha) - \frac{1}{\alpha}\\
&= \frac{\alpha\Gamma(\alpha) - 1}{\alpha}\\
&= \frac{\Gamma(1+\alpha) - \Gamma(1)}{\alpha} \xrightarrow{\alpha\to 0} \Gamma'(1) = -\gamma.
\end{align}$$
On the other hand,
$$\lim_{\alpha\to 0} F(\alpha) = \int_0^1 \frac{e^{-z}-1}{z}\,dz + \int_1^\infty \frac{e^{-z}}{z}\,dz.$$