<s>[INST] Proving $\int_{0}^{\infty}\frac{x}{(x^2+1)(e^{2\pi x}+1)} dx=1-\frac{\gamma}{2}-\ln2$ Nowadays I encounter  an integral which is difficult for me to evaluate it. Please help me to evaluate it. Thank you.

$$\int_{0}^{\infty}\frac{x}{(x^2+1)(e^{2\pi x}+1)} dx=1-\frac{\gamma}{2}-\ln2$$

where $\gamma$ is The Euler–Mascheroni constant.
 [/INST] A Generalisation:
\begin{align}
\int^\infty_0\frac{x}{(x^2+w^2)(1+e^{2\pi x})}{\rm d}x\tag1
=&\int^\infty_0\frac{xe^{-x}}{(x^2+4\pi^2w^2)(1+e^{-x})}{\rm d}x\\ \tag2
=&\int^\infty_0\frac{x}{x^2+4\pi^2w^2}\left(\sum^\infty_{n=1}(-1)^{n-1}e^{-nx}\right){\rm d}x\\ \tag3
=&\int^\infty_0xe^{-x}\left(\sum^\infty_{n=1}\frac{(-1)^{n-1}}{x^2+4n^2\pi^2w^2}\right){\rm d}x\\
=&\int^\infty_0\frac{e^{-x}}{2x}-\frac{e^{-x}}{4w}\mathrm{csch}\left(\frac{x}{2w}\right){\rm d}x\tag4\\
=&-\frac{1}{2}\int^1_0\frac{1}{\ln{x}}+\frac{x^{1/2w}}{w(1-x^{1/w})}\ {\rm d}x\tag5\\
=&-\frac{1}{2}\int^1_0\frac{x^{w-1}}{\ln{x}}+\frac{x^{w-1/2}}{1-x}{\rm d}x\tag6\\
=&-\frac{1}{2}\int^0_\infty\int^1_0x^{t+w-1}+\frac{x^{t+w-1/2}\ln{x}}{1-x}\ {\rm d}x\ {\rm d}t\tag7\\
=&-\frac{1}{2}\int^0_\infty\frac{1}{t+w}-\psi_1\left(t+w+\frac{1}{2}\right)\ {\rm d}t\tag8\\
=&\boxed{\large{\color{blue}{\displaystyle\frac{1}{2}\psi_0\left(w+\frac{1}{2}\right)-\frac{1}{2}\ln{w}}}}\\
\end{align}
Explanation:
$(1)$: Substituted $x\mapsto\dfrac{x}{2\pi}$. 
$(2)$: Expanded $\dfrac{1}{1+e^{-x}}$ as a geometric series. 
$(3)$: Substituted $x\mapsto\dfrac{x}{n}$. 
$(4)$: One can show that $\displaystyle\sum^\infty_{n=-\infty}\frac{(-1)^n}{x^2+4n^2\pi^2w^2}=\frac{1}{2wx}\mathrm{csch}\left(\frac{x}{2w}\right)$ using the residue theorem. 
$(5)$: Substituted $x\mapsto-\ln{x}$. 
$(6)$: Substituted $x\mapsto x^w$. 
$(7)$: Used the fact that $\displaystyle\frac{1}{\ln{x}}=\int^0_\infty x^{t}\ {\rm d}t$. 
$(8)$: Used the integral representation of the polygamma function.

The Integral:
Let $w=1$ to get
$$\int^\infty_0\frac{x}{(x^2+1)(e^{2\pi x}+1)}{\rm d}x=\frac{1}{2}\psi_0\left(\frac32\right)=\boxed{\large{\color{red}{\displaystyle 1-\frac{\gamma}{2}-\ln{2}}}}$$
</s>