Let $f(z)=\frac{z}{\sin(1/z^2)}$.
The singularities of $f$ are comprised of simple poles at $z=\pm \frac{1}{\sqrt{n\pi}}$ and $z=\pm \frac{i}{\sqrt{n\pi}}$, for $n\ge 1$, a non-isolated singularity at $0$.
RESIDUES AT THE POLES
The residues along the real axis are given by
$$\begin{align}
\text{Res}\left(f(z),z=\pm \frac{1}{\sqrt{n\pi}}\right)&=\lim_{z\to \pm 1/\sqrt{n\pi}}\frac{(z\mp 1/\sqrt{n\pi})z}{\sin(1/z^2)}\\\\
&=\lim_{z\to \pm 1/\sqrt{n\pi}}\frac{z+(z\mp 1/\sqrt{n\pi})}{\cos(1/z^2)(-2/z^3)}\\\\
&=\frac{(-1)^{n-1}}{2\pi^2 n^2}
\end{align}$$
The residues along the imaginary axis are identical since $i^4=1$
THE NON-ISOLATED SINGULARITY
The singularity of $f(z)$ at $z=0$ is not an isolated singularity, hence is not an essential singularity. Hence, $f(z)$ has no Laurent series around $z=0$ and no definable residue at $z=0$.
RESIUDE AT INFINITY
The function $f(z)$ has a residue at infinity, which is given by
$$\text{Res}\left(\frac{z}{\sin(1/z^2)},z=\infty\right)=-\text{Res}\left(\frac {1}{z^3\sin(z^2)},z=0\right)=-\frac16$$
SUM OF THE RESIDUES
The sum of the residues from the poles is given by
$$\sum_{n =1}^\infty \frac{(-1)^{n-1}2}{\pi^2 n^2}=\frac{1}{6}$$
INTEGRATION AROUND THE POLES AND NON-ISOLATED SINGULARITIES
Let $R>1/\sqrt{\pi}$. Then, we have
$$\begin{align}
\oint_{|z|=R} f(z)\,dz&=\int_0^{2\pi} \frac{iR^2e^{i2\phi}}{\sin\left(\frac{1}{R^2e^{i2\phi}}\right)}\,d\phi\\\\
&=\int_0^{2\pi}\frac{iR^4e^{i4\phi}}{1-\frac16 \left(\frac{1}{R^2e^{i2\phi}}\right)^2+O\left(\frac{1}{R^8}\right)}\,d\phi\\\\
&=2\pi i\frac{1}{6}+O\left(\frac{1}{R^4}\right)\\\\
&\to 2\pi i\frac{1}{6}\,\,\text{as}\,\,R\to \infty
\end{align}$$
which agrees with the residue at infinity of $-\frac16$!