Improper integral of $\int_0^\infty \frac{dx}{(x^2+{\pi}^2)\cosh(x)}$ 
I want to compute the integral
  $$
\int_0^\infty \frac{dx}{(x^2+{\pi}^2)\cosh(x)}
$$

I tried to use "rectangle" contour $(0 \to R \to R+i\pi \to i\pi+\varepsilon \to i\pi - i\varepsilon \to 0)$, but this is useless because the integral on the upper side is not expressed (it didn’t work out for me) through the original integral.  
Also, representing a fraction as a sum of simple fractions (probably) does not facilitate the task.
And representing the integral as an integral on $\mathbb{R}$ does nothing, since the imaginary axis has a countable number of poles...
Please tell me what kind of substitution in the integral I need to do or which one to choose the contour???
 A: here is a simple approach, but only with real function method
$$\int_{0}^{\infty} {e^{-bt}\cos(at)\,\mathrm{d}t} = \frac{b}{a^2+b^2}$$
we write
$$\begin{aligned}
\int_{0}^{\infty} \frac{\mathrm{d}x}{(x^2+\pi^2)\cosh x} & = \frac1{\pi} \int_{0}^{\infty} \left(\int_{0}^{\infty} {e^{-\pi t}\cos(tx)\,\mathrm{d}t}\right) \frac{\mathrm{d}x}{\cosh x}\\
& = \frac1{\pi} \int_{0}^{\infty} \left(e^{-\pi t} \int_{0}^{\infty} {\frac{\cos(tx)}{\cosh x} \mathrm{d}x} \right) \mathrm{d}t\\
& = \frac1{2} \int_{0}^{\infty} e^{-\pi t} \operatorname{sech}\left(\frac{\pi t}{2}\right) \mathrm{d}t = \int_{0}^{\infty} \frac{e^{-\pi t}}{e^{\pi t/2} + e^{-\pi t/2}} \mathrm{d}t\\
(\text{let } z=e^{-\pi t/2}) \quad
& = \frac2{\pi} \int_{0}^{1} \frac{z^2}{1+z^2} \mathrm{d}z = \frac2{\pi}-\frac1{2}
\end{aligned}$$
where recalling this famous integral
$$\int_{0}^{\infty} {\frac{\cos(\alpha x)}{\cosh(\beta x)}\mathrm{d}x} = \frac{\pi}{2\beta} \operatorname{sech}\left(\frac{\pi\alpha}{2\beta}\right)$$
A: In fact, I found that decomposition into simple fractions solves the problem!
$$
I=\int_0^\infty \frac{dx}{(x^2+{\pi}^2)\cosh(x)}=\int_{-\infty}^\infty dx\frac{e^{x}}{(x^2+{\pi}^2)(e^{2x}+1)}= \\
\frac{1}{2\pi i}\int_{-\infty}^\infty dx\frac{e^{x}}{(x-i\pi)(e^{2x}+1)}-\frac{1}{2\pi i}\int_{-\infty}^\infty dx\frac{e^{x}}{(x+i\pi)(e^{2x}+1)}
$$
After the obvious substitution it's equal to
$$
I=-\frac{1}{2\pi i}\int_{-\infty-\pi i}^{\infty-\pi i} dx\frac{e^{x}}{x(e^{2x}+1)}+\frac{1}{2\pi i}\int_{-\infty+\pi i}^{\infty+\pi i} dx\frac{e^{x}}{x(e^{2x}+1)}
$$
Now if we take the contour: $-R+\pi i \to R+\pi i \to R - \pi i \to -R - \pi i$, then it's clear, that $$I = -\sum\limits_{k} Res[f(z),z_k]$$  Where $f(z)=\frac{e^{z}dz}{z(e^{2z}+1)}$ and $z_k \in[-\frac{\pi i}{2}, \ 0,\  \frac{\pi i}{2}]$.
Thus the answer follows: $I=\frac{2}{\pi}-\frac{1}{2}$.
