I am not exactly sure what you are asking. I will write what I think you are asking. You want to find . Immediately there is a problem. This integral diverges. So let us use a different example, say . To find this integral we define . And find the residues in the upper half-plane. Then we define a contour integral over the semicircle from to (where is suffiiciently large) in the upper-half plane. We compute this integral in two ways. The first way is by using the Residue theorem and the other using the direct definition of contour integration. Then we take the limit as and argue that the semi-circle integral vanishes, and we are just left an integral from which is what we want.