Cauchy's residue theorem - help

I'm trying to prove the reciprocity law for quadratic Gauss sums when m=1(mod 4) and need help showing something. Could anyone help? It's been a while since I done any residue calculus.

Let C be the rectangular contour with vertices, iR, -iR, 1/2m+iR and 1/2m-iR. It also has a semicircular indentation of radius epsilon (< 1) at 0.

Define

Prove that

Clearly f is analytic everywhere, except for a first order pole at each integer, but I am stumped at how to get the required result.