The residue at infinity is given by:
$$\underset{z_0=\infty}{\operatorname{Res}}f(z)=\frac{1}{2\pi i}\int_{C_0} f(z)dz$$
Where $f$ is an analytic function except at finite number of singular points and $C_0$ is a closed countour so all singular points lie inside it.
It can be proven that the residue at infinity can be computed calculating the residue at zero.
$$\underset{z_0=\infty}{\operatorname{Res}}f(z)=\underset{z_0=0}{\operatorname{Res}}\frac{-1}{z^2}f\left(\frac{1}{z}\right)$$
The proof is just to expand $-\frac{1}{z^2}f\left(\frac{1}{z}\right)$ as a Laurent series and to see that the $1/z$ is the integral mentioned.
I can see that we change $f(z)$ to $f(1/z)$ so the variable tends to infinity.
But, is there any intutive reason of why we introduce the $-1/z^2$ factor?
$-1/z^2$ comes from changing the variable from $z$ to $u=1/z$.
So $$ \int_{C_0} f(z)dz=\int_{C'} f(1/u)d(1/u)=-\int_{C'}\frac{-1}{u^2}f(1/u)du $$
where $C'$ is the trace of $C_0$ in the $u$ space. If all singularity lies within $C_0$ in the $z$ space, then every singularity (except for the one at $u=0$) of $-(1/u^2)f(1/u) $ would lie outside the $C'$ in the $u$ space.
Since $u=0$ is the only singular point of $-(1/u^2)f(1/u)$ inside $C'$, thus this integral gives the residue at $u=0$, or equivalently, $z=\infty$.