I'm reading Titchmarsh's "The theory of the Riemann zeta function", and on p.81 it is claimed that
$$ \int_{x}^{x+i\infty} (\cot(\pi z)+i)z^{-s} \, \mathrm{d}z \ll \frac{x^{-\sigma}}{2(n+1)\pi-|t|/x} \tag{1}$$
where $\sigma=\Re(s), t=\Im(s), x$ is a half-positive integer and $n$ is an arbitrary positive integer.
Titchmarsh proves (1) by invoking the identity
$$-\cot(\pi z) - i =2i\sum_{v=1}^{n} e^{2\pi i vz} + \frac{2ie^{2(n+1)\pi i z}}{1-e^{2\pi iz}},$$
but doesn't show the steps. That's what I'm asking for.