The origin of this problem lies in the explanation of the evaluation of the series $\sum_{n\geq1}\frac{\cos(nx)}{n^2}=\frac{x^2}{4}-\frac{2\pi}{4}+\frac{\pi^2}{6}$
see this link ( Series $\sum_{n=1}^{\infty}\frac{\cos(nx)}{n^2}$ )
In the proposed solution a complex integral needs to be evaluated, which is a inverse mellin transform. This is done using the residue theorem.
Let $Q(s)=-\Gamma(s-2)\zeta(s)\cos(\frac{\pi s}{2})$.
The question is how to evaluate $\int_{\frac{5}{2}-i\infty}^{\frac{5}{2}+i\infty} Q(s)/x^s \, ds$
The author states that he integrates over the left plane, I suppose he uses a semi circle as a contour, which includes the 3 poles and if $R\rightarrow +\infty$ the integral over the arc vanishes and the part where $\operatorname{Re}(s)>\frac{5}{2}$ is covered. But how can I prove this? I tried to apply Jensens lemma which didn't work. What am I missing?
Note that for any $\sigma$, the absolute convergence of the integral
$$\int_{\sigma-i\infty}^{\sigma+i\infty} Q(s)/x^s ds$$
is guaranteed by Stirling's formula and the bound for Riemann zeta function in vertical strips, provided that we stay away from the poles of $Q(s)$. This is because we know the growth properties of $\Gamma(s-2)$, $\cos(\pi s/2)$ and $\zeta(s)$ as $\text{Im}(s)\rightarrow \infty$.
In detail, let $s=\sigma+it$, then for $\sigma<0$, as $t\rightarrow \infty$,
$$\zeta(s)\ll (2\pi)^{-\sigma} |t|^{1/2-\sigma}$$ $$\Gamma(s-2)\sim \exp (-\frac{\pi}{2}|t|)|t|^{\sigma-2-1/2}$$ $$\cos(\pi s/2)\sim \exp (\frac{\pi}{2}|t|)$$
So their product is far less than$$(2\pi)^{-\sigma} |t|^{-2} $$
After this is justified, we can just construct a box to be our contour, with vertex $5/2-iT,5/2+iT,-N-iT,-N+iT$ for large $T$ and $N$. As long as $|x/2\pi|<1$, the integral goes to $0$ as $\sigma=-N\rightarrow -\infty$.