I am looking for ideas on proving the Eulerian expansion of the cotangent using residue calculation: $$\pi\cot(\pi z)=\frac{1}{z}+\sum\_{n=1}^{\infty}\left(\frac{1}{z+n}+\frac{1}{z-n}\right), \ z\in\mathbb{C}\backslash\mathbb{Z}.$$



Residue calculation for Eulerian expansion of the cotangent
The residue approach to the partial fraction expansion of $\cot(z)$ is explained in Freitag & Busam's "Complex Analysis", Prop. III.7.13, and probably in other books as well.


Here is a more general result regarding partial fraction expansions:


**Proposition:** Let $f \in \mathcal{M}(\mathbb{C})$ and let $(\gamma\_n)\_{n \in \mathbb{N}}$ be a family of shrinking rectifiable loops that avoid the poles of $f$ and whose interiors exhaust $\mathbb{C}$, i.e. $\gamma\_n$ is in the interior of $\gamma\_{n+1}$. If
$$
\lim\_{n \to \infty} \int\_{\gamma\_n} \frac{|f(z)| |dz|}{|z|} = 0,
$$
then
$$
f(z) = \sum\_{n=1}^\infty \sum\_{p\_k \in A\_n} P\_k\bigg(\frac{1}{z-p\_k}\bigg),
$$
where $A\_n :=$ interior of $\gamma\_n$ $\setminus$ closure of the interior of $\gamma\_{n-1}$ is the $n$-th open "annulus", $p\_k$ are the poles of $f$ lying in the respective open annulus and $P\_k$ are the corresponding principal parts.


*Proof:* Apply the residue theorem for each $\gamma\_n$ and use the vanishing condition to ensure (compact) convergence. $\square$


