Let $\gamma$ be the Euler-Mascheroni constant.
I'm trying to prove that
$$2\int_0^\infty \frac{e^x-x-1}{x(e^{2x}-1)} \, \mathrm{d}x =\ln(\pi)-\gamma $$
I tried introducing a parameter to the exponent in the numerator and then differentiating under the integral sign. But doing so seems to result in an integral that doesn't converge.
Hint. One may set $$ f(s):=2\int_0^\infty \frac{e^{sx}-sx-1}{x(e^{2x}-1)}dx, \quad 0<s<2. \tag1 $$ In order to get rid of the factor $x$ in the denominator, we may differentiate under the integral sign getting $$ f'(s)=2\int_0^\infty \frac{e^{sx}-1}{e^{2x}-1}dx, \quad 0<s<2. \tag2 $$ Then expanding the latter integrand in $e^{-kx}$ terms and integrating termwise we get $$ f'(s)=-\gamma-\psi\left(1-\frac{s}2\right) \tag3 $$ where $\displaystyle \psi : = \Gamma'/\Gamma$ and where $\gamma$ is the Euler-Mascheroni constant.
Integrating $(3)$, with the fact that, as $s \to 0$, $f(s) \to 0$, we get
from which you deduce the value of your initial integral by putting $s:=1$.