Let's have integral: $$ I = \int \limits_{-\infty}^{\infty} \frac{e^{-\frac{x^{2}}{2}}}{x - a - i0} $$ How to evaluate it?
I tried to do following: $$ \frac{1}{x -a - i0} = \int \limits_{0}^{\infty}d\tau e^{-\tau (x - a - i 0)} \Rightarrow I = \sqrt{2 \pi}\int \limits_{0}^{\infty}d\tau e^{-\frac{\tau^{2}}{2} + ia\tau}, $$ which is expressed in terms of Erf. Is this right?
This is really an evaluation of the Cauchy principal value of the integral. Note that
$$PV \int_{-\infty}^{\infty} dx \frac{e^{-x^2/2}}{x-a} = 2 a \, PV \int_{0}^{\infty} dx \frac{e^{-x^2/2}}{x^2-a^2}$$
Now consider the contour integral
$$\oint_C dz \frac{e^{-z^2/2}}{z^2-a^2}$$
where $C$ is a wedge of angle $\pi/4$ of radius $R$ in the upper right quadrant, with a semicircular detour of radius $\epsilon$ into the upper half plane at $z=a$. The contour integral is equal to
$$PV \int_{0}^{R} dx \frac{e^{-x^2/2}}{x^2-a^2} + i \epsilon \int_{\pi}^0 d\phi \, e^{i \phi} \frac{e^{-(a+\epsilon e^{i \phi})^2/2}}{(a+\epsilon e^{i \phi})^2-a^2} \\ + i R \int_0^{\pi/4} d\theta \, e^{i \theta} \frac{e^{-R^2 e^{i 2 \theta}/2}}{R^2 e^{i 2 \theta}-a^2}+ e^{i \pi/4} \int_R^0 dt \, \frac{e^{-i t^2/2}}{i t^2-a^2}$$
Take the limit as $R \to \infty$ and $\epsilon \to 0$. The third integral vanishes in this limit. The second integral approaches $-i \pi/(2 a) e^{-a^2/2}$.
By Cauchy's theorem, the contour integral is zero. Thus, we can say that
$$PV \int_{-\infty}^{\infty} dx \frac{e^{-x^2/2}}{x-a} = i \pi \, e^{-a^2/2} - 2 a e^{i \pi/4} \int_0^{\infty} dt \, \frac{e^{-i t^2/2}}{i t^2-a^2}$$
The latter integral may be evaluated in terms of error functions.
ADDENDUM
The integral is almost straightforward to evaluate. Write the integral as
$$e^{-y a^2}\int_0^{\infty} dt \, \frac{e^{-y (i t^2-a^2)}}{i t^2-a^2}$$
where $y=1/2$. Now define
$$I(y) = \int_0^{\infty} dt \, \frac{e^{-y (i t^2-a^2)}}{i t^2-a^2}$$
$$I'(y) = -e^{y a^2} \int_0^{\infty} dt \, e^{-i y t^2} = -\frac12 \sqrt{\pi} e^{-i \pi/4} y^{-1/2} e^{y a^2}$$
$$I(0) = \int_0^{\infty} \frac{dt}{i t^2-a^2} = -i e^{-i \pi/4} \frac{\pi}{2 a} $$
Then
$$I(y) = -i e^{-i \pi/4} \frac{\pi}{2 a} - \frac12 \sqrt{\pi} e^{-i \pi/4} \int_0^y dy'\, y'^{-1/2} e^{y' a^2} = -i e^{-i \pi/4} \frac{\pi}{2 a} - \frac{\pi}{2 a} e^{-i \pi/4} \operatorname{erfi}{\left (a \sqrt{y}\right )} $$
where $\operatorname{erfi}$ is the imaginary error function
$$\operatorname{erfi}{x} = \frac{2}{\sqrt{\pi}} \int_0^x dt \, e^{t^2} $$
Finally, we may plug in $y=1/2$ and we have
$$PV \int_{-\infty}^{\infty} dx \frac{e^{-x^2/2}}{x-a} = -\pi e^{-a^2/2} \operatorname{erfi}{\left (\frac{a}{\sqrt{2}}\right )}$$