Solution (source code)

= Solution

For $z\ne0$, singularities occur when $1/z=n\pi$, with $n\ne0$. Each is a <simple pole>, since the substitution has nonzero <derivative> there:
$$
\boxed{z_n=\frac1{n\pi},\qquad n\in\mathbb Z\setminus\{0\}.}
$$
More explicitly, $1/z-n\pi\sim-(z-z_n)/z_n^2$, so $\cot(1/z)\sim-z_n^2/(z-z_n)$ and its <residue> is $-1/(n^2\pi^2)$.

These <poles> accumulate at zero. Consequently $\boxed{z=0\text{ is a non-isolated singularity}}$. The removable/pole/essential classification for <isolated singularities> cannot be applied at that accumulation point; it is not an isolated <essential singularity>.