Cauchy-Goursat states a closed contour integral over a region where the integrand is analytic is zero. So for the function , surely everything outside the small circle surrounding the two red poles in the figure below is analytic right? Now try to visualize the large circle, and the red and blue lines connecting the box deformed into a nice "bent circle". That's a closed contour in a region where the function is analytic and if I now trace a path around the circle, down the blue, around the box, and back up the red to the circle and let the red and blue lines touch, then the integral over the red and blue lines cancel since it's over a region the function is analytic and since I'm going in the positive sense around the large circle and negative sense around the box then I'd have:

or: