I'll do the first one and give a hint for the second one.
******************************************************* I'm proving the more general: \( \displaystyle \sum_{n=\infty}^{\infty}\frac{1}{n^2+a^2}=\frac{\pi}{a}\coth\left ( \pi a \right ) , \; a>0\)
For this purpose I consider the function \( \displaystyle g(z)=\pi\cot \left ( \pi z \right )f(z)=\frac{\pi \cot \left (\pi z \right )}{z^2+a^2} \) which has poles at \(z_1=ai, \; z_2=ai \). The residue at \(z_1 \) is \( \displaystyle \frac{\pi\coth(\pi a)}{2a} \) and similarly the residue at \(z_2 \) is equal to \( \displaystyle \frac{\pi\coth(\pi a)}{2a} \).
Hence: $$\sum_{n=\infty}^{\infty}\frac{1}{n^2+a^2}=\sum_{residues}=\frac{\pi\coth(\pi a)}{a}$$
It is known that \( \cot(ai)=i\coth(a) \)
For the second sum consider the function \( \displaystyle g(z)=\pi \csc (\pi z)f(z) \) , evaluate the residues at all poles. The series will then be equal to the minus sum of the residues.
_________________ Imagination is much more important than knowledge.
