How to evaluate such integral with pole structure? 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?
 A: 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 )}$$
A: $\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,}
 \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack}
 \newcommand{\dd}{\mathrm{d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\mc}[1]{\mathcal{#1}}
 \newcommand{\mrm}[1]{\mathrm{#1}}
 \newcommand{\on}[1]{\operatorname{#1}}
 \newcommand{\pars}[1]{\left(\,{#1}\,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,}
 \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$
\begin{align}
I = &\bbox[5px,#ffd]{\int_{-\infty}^{\infty}{\expo{-x^{2}/2} \over x - a - \ic 0^{+}}\,\dd x} =
\mrm{P.V.}\int_{-\infty}^{\infty}{\expo{-x^{2}/2} \over x - a}
\,\dd x +
\ic\pi\expo{-a^{2}\,/2}
\\[5mm] & =
\ic\pi\expo{-a^{2}\,/2}  +
\mrm{P.V.}\int_{-\infty}^{\infty}{%
\expo{-\pars{x + a}^{\,\,2}\,\,/2} \over x}\,\dd x
\\[5mm] & =
\ic\pi\expo{-a^{2}\,/2}  +
\int_{0}^{\infty}{%
\expo{-\pars{x + a}^{\,\,2}\,\,/2} -
\expo{-\pars{x - a}^{\,\,2}\,\,/2} \over x}\,\dd x
\\[5mm] & =
\ic\pi\expo{-a^{2}\,/2}  -
2\expo{-a^{2}\,/2}\
\underbrace{\int_{0}^{\infty}{%
\expo{-x^{2}\,/2}\sinh\pars{2ax}  \over x}\,\dd x}
_{\ds{{1 \over 2}\,\pi\on{erfi}\pars{\root{2}a}}}
\\[5mm] = &\
\bbx{-\pi\expo{-a^{2}\,/2}\on{erfi}\pars{\root{2}a} +
\ic\pi\expo{-a^{2}\,/2}} \\ &\
\end{align}
