Residue theorem, double pole, sinh. how can I use the residue theorem to calculate
$$\int_{-\infty}^\infty dx\, \frac{e^{-i x}}{(\sinh x)^2}$$
Im confused about how to tackle the double pole at $x=in\pi$. Thanks!

To calculate the residue of $f$ at $z_0$ for a pole of order $m$ we have
$$\text{Res}(z_0,f(z))=\frac{1}{(n-1)!}\lim_{z\to z_0} \frac{d^{n-1}}{dz^{n-1}}\left((z-z_0)^n f(z)\right)$$
So, for $f(z)=\frac{e^{-iz}}{(\sinh z)^2}$, $n=2$ and $z=im\pi$ we have
$$\begin{align}
\text{Res}(im\pi,f(z))&=\frac{1}{(2-1)!} \lim_{z\to im\pi}\frac{d^{2-1}}{dz^{2-1}}\left((z-im\pi)^2 \frac{e^{-iz}}{(\sinh z)^2}\right)\\\\
&=\lim_{z\to im\pi}\frac{d}{dz}\left((z-im\pi)^2 \frac{e^{-iz}}{(\sinh z)^2}\right)
\end{align}$$

Footnote: The integral of interest diverges at $x=0$!
