That's a contour integral isn't it? I had started doing the integral with the substitution before I recognized that! The integrand is analytic everywhere except at z= ix and z= -ix which are poles. If the contour does not inclose either of those, then the integral is 0. If it does inclose either or both, then you can look at its residues at those points.