I want to know how to compute the following integral:
$$\int_{-\infty}^{+\infty} dx \, \frac{e^{-x^2}}{x-i} \, .$$
Mathematica gives
$$i \, e \, \pi \, \text{erfc(1)} \, ,$$
but I don't know how to calculate it. I think contour integral does not work, because $e^{−z^2}$ does not vanish at $\pm i \infty$. One could take $e^{−|z|^2}$, but then it's not holomorphic. One can expand the exponential in series, but then each of the integrals one gets is divergent. Any ideas?