I am trying to calculate the improper integral: $$ I=\int_{-\infty}^{+\infty} f(x) dx $$ with $$ f(x)=\frac1{8\pi^3}\frac{x^2 \sqrt{1+x^2}}{1+e^\sqrt{1+x^2}}.$$
The function $f(x)$ has poles at $x_0=\pm i \sqrt{1+\pi^2}$. I can then choose a contour of integration in the complex plane that includes either of the poles and goes through the upper/lower half plane.
For example, for $x_0=- i \sqrt{1+\pi^2}$ and choosing the contour to go through the lower half plane we have a residue of $$ \operatorname{Res}=\lim_{x\to x_0} (x-x_0)f(x)=-\frac{i\sqrt{1+\pi^2}}{8 \pi} $$ and the integral becomes: $$I=2\pi i\cdot\operatorname{Res}=\frac{\sqrt{1+\pi^2}}{4}\approx 0.824227$$ but both Mathematica and a simple trapezoidal rule integration give a numerical result of $I\approx 0.0422885$.
Can anyone point out the error in the calculation of the residue/integral?