In one paper I saw this equality:

$$\sum_{\eta=-\infty}^{\infty}\frac{z}{(z+\eta)}=\pi z\cot(\pi z)$$ which is the same as $$\sum_{\eta=-\infty}^{\infty}\frac{1}{(z+\eta)}=\pi \cot(\pi z)$$ where summation is understood in the sense of a principal value. What does it mean?

In another paper I found the next expression:

$$\frac{\exp(2\pi iaz)}{\exp(2\pi iz)-1}=\frac{1}{2\pi i}\sum_{n=-\infty}^{\infty}\frac{\exp(2\pi ina)}{z-n}$$ for $a=0$ it is equivalent to $$\frac{1}{\exp(2\pi iz)-1}=\frac{1}{2\pi i}\sum_{n=-\infty}^{\infty}\frac{1}{z+n}$$ which is not exactly the same expression like in the first case. $$\sum_{n=-\infty}^{\infty}\frac{1}{z+n}=\pi Cot[\pi z]-i\pi$$

Where is my mistake?

If the second formula is wrong, what is the correct formula for the second case? $$\sum_{n=-\infty}^{\infty}\frac{\exp(2\pi ina)}{z+n}=?$$