Calculating the integral using residues. 
How can this integral be calculated using Cauchy's basic residue theorem? I tried to represent $cos(\alpha x)$ as $Re[e^{i\alpha x}]$, and try to calculate the general integral in this form:
$\int\limits_0^\infty Re[\frac{e^{i\alpha x}}{ch(x)+ch(a)}]dx$
However, due to the fact that $\alpha$ is a complex number, such reasoning will not be correct.
 A: The appropriate way to evaluate this integral is to use the rectangular contour: $-R\to R\to R+2\pi i\to -R+2\pi i\to -R$.
We split integral in to to part:
$$I=\int_0^\infty\frac{\cos bx}{\cosh x+\cosh a}dx=\frac{1}{4}\Big(\int_{-\infty}^\infty\frac{e^{ibx}}{\cosh x+\cosh a}dx+\int_{-\infty}^\infty\frac{e^{-ibx}}{\cosh x+\cosh a}dx\Big)$$
$$=\frac{1}{4}\big(I_0(b)+I_0(-b)\big)$$
We suppose that $\,b\in C\,$ and $\,\Im\, b\in(-1;1)$. To evaluate $I_0(b)$ we use the following contour:

It can be shown that integrals $[1]$ and $[2] \,\to 0$ at $R\to\infty$.
$$\oint\frac{e^{ibz}}{\cosh z+\cosh a}dz=I_0-I_0e^{ib(2\pi i)}=2\pi i \sum\operatorname {Res}\frac{e^{ibz}}{\cosh z+\cosh a}$$
We have two simple poles inside the contour at $z=\pi i+a$ and $z=\pi i-a$. The residues evaluation is straightforward.
$$I_0(b)\big(1-e^{ib(2\pi i)}\big)=2\pi i\Big(-\frac{e^{-\pi b+iab}}{\sinh a}+\frac{e^{-\pi b-iab}}{\sinh a}\Big)$$
$$I_0(b)=2\pi\frac{\sin (ab)}{\sinh a\sinh (\pi b)}=I_0(-b)$$
Therefore,
$$I=\frac{\pi\,\sin (ab)}{\sinh a\sinh (\pi b)}$$
Quick check: $\displaystyle I(a=b=0)=1$.
On the other hand,
$$\ \int_0^\infty\frac{dx}{\cosh x+1}=2\int_0^\infty\frac{e^x\,dx}{e^{2x}+2e^x+1}=2\int_1^\infty\frac{dt}{(1+t)^2}=1$$
