OK so I am not sure if this problem is analysis, number theory or calculus.

I am reading an English translation of Riemann's 1859 paper on the number of primes and cannot follow this bit.

He says consider this integral:

From infinity in a positive sense around a domain that includes 0 but does not include any other point of discontinuity. This is then equal to:

I would like to fill in the details of this step but have been unsuccessful. I have tried:

Finding the residue at z=0 by solving:

I also tried generalising x to z and integrating around the path from inf,

to

to

to

to

where

This gave interesting results when

either; tended to 0 equals pi or equals pi/2.

But non-the less I have not been able to get the required result. Is one of my approaches right? Is there a better approach?