Starting from the limit definition of the Euler-Mascheroni constant $\gamma$ as given by
$$\gamma=\lim_{n\to \infty}\left(-\log(n)+\sum_{k=1}^n\frac1k\right)\tag 1$$
we can show that $\gamma$ has an integral representation
$$\gamma=\int_0^\infty\left(\frac{1}{e^x-1}-\frac{1}{xe^x}\right)\,dx \tag 2$$
Proof of $(2)$: This is provided for completeness only and one can skip this part without losing context.
To show that the integral in $(2)$ is equivalent to $(1)$, we can proceed as follows.
$$\begin{align} \int_0^\infty\left(\frac{1}{e^x-1}-\frac{1}{xe^x}\right)\,dx&= \int_0^\infty \frac{e^{-x}}{1-e^{-x}}\left(1-\frac{1-e^{-x}}{x}\right)\,dx\\\\ &=\sum_{k=1}^\infty \int_0^\infty\left(e^{-kx}-\frac{e^{-kx}-e^{-(k+1)x}}{x}\right)\,dx\\\\ &=\sum_{k=1}^\infty \left(\frac{1}{k}-\log\left(\frac{k+1}{k}\right)\right)\\\\ &=\lim_{n\to \infty}\sum_{k=1}^n \left(\frac1k -\log\left(\frac{k+1}{k}\right)\right)\\\\ &=\lim_{n\to \infty}\left(-\log(n+1)+\sum_{k=1}^n\frac1k\right)\\\\ &=\lim_{n\to \infty}\left(-\log(n)+\sum_{k=1}^n\frac1k\right)\\\\ \end{align}$$
Another integral representation for $\gamma$ is given by
$$\gamma=\int_0^\infty \left(\frac{1}{x(1+x^a)}-\frac{1}{xe^x}\right) \,dx \tag 3$$
for $a>0$.
Equipped with $(2)$, we can show the equivalence of $(3)$ with $(1)$ by showing that
$$\int_0^\infty \left(\frac{1}{x(1+x^a)}-\frac{1}{e^x-1}\right)\,dx=0\tag 4$$
To prove $(4)$, I proceeded as follows.
$$\begin{align} \lim_{\epsilon\to 0^+}\int_{\epsilon}^\infty\left(\frac{1}{x(1+x^a)}-\frac{1}{e^x-1}\right)\,dx &=\lim_{\epsilon\to 0^+}\left.\left(-\frac1a \log(1+x^{-a})-\log(1-e^{-x})\right)\right|_{\epsilon}^{\infty}\\\\ &=\lim_{\epsilon\to 0^+}\left(\frac1a \log(1+\epsilon^{-a})+\log(1-e^{-\epsilon})\right)\\\\ &=0 \end{align}$$
And we are done!
This approach seemed a bit cumbersome and indirect.
QUESTION: So, what are alternative approaches to establishing equivalence of $(3)$ and $(1)$?