|z|= a is a circle about the origin with radius a. for any point on that circle, where is the angle the radius to the point z makes with the positive real (x) axis. Use that substitution and integrate as goes from 0 to .

You will have to consider the cases where and separately.