For $a>0$, prove:
$$ \sum_{n=1}^{\infty}\frac{1}{n^2+a^2} = \left( \frac{\pi}{a}\cdot\frac{\exp(\pi a) + \exp(-\pi a)}{\exp(\pi a) - \exp(-\pi a)} - \frac{1}{a^2}\right) $$
One idea I have is to expand RHS and manually check that series expansions match, but that seems troublesome. There is a hint to use residue theorem, but I don't see how to translate this setting to integrals? Perhaps some Riemann sum on the left hand side?