How to prove the result of this integration? How to prove that?
$$\int_0^1 \frac{1 - e^{-t} - e^{-1/t}}{t}\ \text{d}t = \gamma$$
where $\gamma = 0.5772156649015328606065\ldots$ is the Euler-Mascheroni constant.
Additional question: is there a way to evaluate it via Residues Theorem too? 
 A: Preliminary results.
Let us begin with a definition of the Euler-Mascheroni Constant
\begin{equation}
\gamma = \lim_{n \to \infty} H_{n} - \mathrm{ln}(n)
\label{eq:1}
\tag{1}
\end{equation}
where $H_{n}$ are the harmonic numbers defined as
\begin{equation}
H_{n} = \displaystyle\sum_{k=1}^{n} \frac{1}{k}
\label{eq:2}
\tag{2}
\end{equation}
Let
\begin{equation}
\int\limits_{0}^{1} \frac{1-(1-x)^{n}}{x} \mathrm{d} x = H_{n}
\label{eq:3}
\tag{3}
\end{equation}
Proof:
\begin{align}
\tag{a}
\int\limits_{0}^{1} \frac{1-(1-x)^{n}}{x} \mathrm{d} x & = \int\limits_{0}^{1} \frac{1-y^{n}}{1-y} \mathrm{d} y \\
& = \int\limits_{0}^{1} \frac{1}{1-y} \mathrm{d} y \, - \int\limits_{0}^{1} \frac{y^{n}}{1-y} \mathrm{d} y \\
\tag{b}
& = \int\limits_{0}^{1} \displaystyle\sum_{k=0}^{\infty} y^{k} \mathrm{d} y \,\, - \int\limits_{0}^{1} y^{n} \displaystyle\sum_{k=0}^{\infty} y^{k} \mathrm{d} y \\
& = \displaystyle\sum_{k=0}^{\infty} \frac{y^{k+1}}{k+1} \Big|_{0}^{1} \,\, - \displaystyle\sum_{k=0}^{\infty} \frac{y^{k+n+1}}{k+n+1} \Big|_{0}^{1} \\
& = (1 + \frac{1}{2} + \frac{1}{3} + \dots) \, - (\frac{1}{n+1} + \frac{1}{n+2} +\frac{1}{n+3} + \dots) \\
& = 1 + \frac{1}{2} + \frac{1}{3} + \dots + \frac{1}{n} = H_{n}
\end{align}
Notes:
a. Let $y=1-x$
b. Expand $$\frac{1}{1-y} = \sum\limits_{k=0}^{\infty} y^{k}$$
Main result. 
\begin{align}
\gamma &= \int\limits_{0}^{1} \frac{1-\mathrm{e}^{-x}-\mathrm{e}^{-1/x}}{x} \mathrm{d}x \\
&= \int\limits_{0}^{1} \frac{1-\mathrm{e}^{-x}}{x} \mathrm{d}x - \int\limits_{0}^{1} \frac{\mathrm{e}^{-1/x}}{x} \mathrm{d}x \\
&= \int\limits_{0}^{1} \frac{1-\mathrm{e}^{-x}}{x} \mathrm{d} x \,\, - \int\limits_{1}^{\infty} \frac{\mathrm{e}^{-x}}{x} \mathrm{d} x
\label{eq:4}
\tag{4}
\end{align}
We made the substitution $z=1/x$, then switched variables back to $x$.
Make the substitution $x = \frac{y}{n}$ in equation \eqref{eq:3} to obtain
\begin{align}
H_{n} & = \int\limits_{0}^{n} \frac{1-(1-\frac{y}{n})^{n}}{y} \mathrm{d} y \\
& = \int\limits_{0}^{1} \frac{1-(1-\frac{y}{n})^{n}}{y} \mathrm{d} y \,\, + \int\limits_{1}^{n} \frac{1-(1-\frac{y}{n})^{n}}{y} \mathrm{d} y \\
& = \int\limits_{0}^{1} \frac{1-(1-\frac{y}{n})^{n}}{y} \mathrm{d} y \,\, + \int\limits_{1}^{n} \frac{1}{y} \mathrm{d} y \,\, - \int\limits_{1}^{n} \frac{(1-\frac{y}{n})^{n}}{y} \mathrm{d} y \\
& = \int\limits_{0}^{1} \frac{1-(1-\frac{y}{n})^{n}}{y} \mathrm{d} y \,\, + \mathrm{ln}(n) \, - \int\limits_{1}^{n} \frac{(1-\frac{y}{n})^{n}}{y} \mathrm{d} y
\label{eq:5}
\tag{5}
\end{align}
Now we invoke the limit defnition of the exponential function
\begin{equation}
\mathrm{e}^{\pm x} = \lim_{n \to \infty} \left(1 \pm \frac{x}{n} \right)^{n}
\label{eq:6}
\tag{6}
\end{equation}
rearrange equation \eqref{eq:5} and take $\lim_{n \to \infty}$, we have
\begin{equation}
\lim_{n \to \infty} \left(H_{n} - \mathrm{ln}(n)\right)
= \lim_{n \to \infty} \left(\int\limits_{0}^{1} \frac{1-(1-\frac{y}{n})^{n}}{y} \mathrm{d}y
- \int\limits_{1}^{n} \frac{(1-\frac{y}{n})^{n}}{y} \mathrm{d}y\right)
\end{equation}
The left hand side equals $\gamma$ by equation \eqref{eq:1} as does the right hand side by equations 
\eqref{eq:6}, \eqref{eq:5}, and \eqref{eq:4}.
A: $$\int_{0}^{1}\frac{1-e^{-t}-e^{-1/t}}{t}dt=\int_{0}^{1}\frac{1-e^{-t}}{t}dt-\int_{0}^{1}\frac{e^{-1/t}}{t}dt
 $$ $$\stackrel{IBP}{=}\int_{0}^{1}\log\left(t\right)e^{-t}dt+\int_{0}^{1}\frac{\log\left(t\right)e^{-1/t}}{t^{2}}dt
 $$ $$\stackrel{1/t\rightarrow t}{=}\int_{0}^{1}\log\left(t\right)e^{-t}dt+\int_{1}^{\infty}\log\left(t\right)e^{-t}dt
 $$ $$=\int_{0}^{\infty}\log\left(t\right)e^{-t}dt=-\Gamma'\left(1\right)=\color{red}{\gamma}.$$
A: $$\int_0^1 \frac{e^{-1/t}}{t}dt = \int_1^\infty \frac{e^{-t}}{t}dt$$
So your integral is
$$\int_0^\infty \frac{1_{t < 1}-e^{-t}}{t}dt =\lim_{ s \to 0^+}\int_0^\infty t^{s-1}(1_{t < 1}-e^{-t})dt = \lim_{s \to 0^+} \frac{1}{s}-\Gamma(s)$$
$$ = \lim_{s \to 0^+} \frac{\Gamma(1)-\Gamma(s+1)}{s} = -\Gamma'(1) = \gamma$$
For proving that $\Gamma'(1) = -\gamma$ there are many ways, but I never remember the best one.
