It seems appropriate to describe briefly how the residue at infinity
is calculated.
Firstly, we can deal only with the case where a counterclockwise
contour C exists that can encompass all the poles of the function in
the finite complex plane.
Next, we treat the complex plane as a sphere with 0 at the south pole
and infinity at the north pole. ( This is just the reverse of the
spherical projection of a sphere onto a plane. )
Now the contour C , when traveled clockwise, can be taken as enclosing
the point infinity. Therefore, the residue at infinity is equal to
the negative of the sum of the residues of all the poles in the finite
complex plane.
In the special case where there is only one pole in the finite plane,
the residue at infinity is equal to the negative of that of the
former.
If C doesn't exist, there is no general way to calculate the residue
at infinity.