First, I have to study the singularities of $f(z)=(4z^2+1)\tanh (\pi z) $, and calculate the residues. This part should be correct, I found that $f $ has simple poles in the points $\{z_n =\frac i 2+ni: n\in \mathbb Z,n\ne0,-1\}$, and removable singularities in $\frac i 2 $ and $-\frac i 2 $; the residue of the pole in a $z_n $ is equal to $\frac {4z_n^2+1} \pi$.
I'm in trouble with the second part: calculate $\int_{C_R (0)} f (z)dz$, for $R $ sufficiently large. My only idea was to sum the residues, so I tried with $$2\sum_1^\infty \frac { \Bigl(\frac i 2+in\Bigl)^2+1} \pi$$ since $f $ is symmetrical on the imaginary axis. However this series doesn't converge, so I think I must be wrong with something. Thank you in advance
If as you say the residue at the pole $\;z_n=\cfrac{(2n+1) i}2\;$ is
$$\frac{4z_n^2+1}\pi=\frac1\pi\left(-(2n+1)^2+1\right)=\frac1\pi(-4n^2-4n)=-\frac{4n} \pi(n+1)$$
so for big $\;R\;$, we get a finite sum of residues
$$\frac4\pi\sum_{n=-k}^k(n^2+n)=\frac4\pi\left[2\sum_{n=1}^kn^2+0\right]=\frac8\pi\frac{k(k+1)(2k+1)}6=\frac4{3\pi}k(k+1)(2k+1)$$
Of course, you take out from the above the case for $\;n=-1\;$ and etc.