Does this integral have an analytical solution? (The residue theorem method seems to fail here) The integral is the following:
\begin{equation}
  \int_{-\infty}^{+\infty}dx \frac{e^{-{\sigma}^2(x+b)^2}}{x^2+a^2}
\end{equation}
I know there is an analytical solution when $b=0$. But what about $b\neq0$ ?
 A: A contour integral here is not so convenient as we cannot neglect the contribution from closing the contour in the upper or lower half plane, $e^{-z^2}$ does not go to zero on that contour. Mathematica does not evaluate it, but the integral may be done using Feynman's trick.
By rescaling $x$ we may set one constant to unity, I choose $\sigma=1$. Now consider
$$ \tag{1}
I(\alpha)=\int\limits_{-\infty}^\infty dx \ \exp \left( -(x+b)^2-\alpha(x^2+a^2) \right)
$$
This is integrated by completing the square in the exponent
$$ \tag{2}
I(\alpha)=\sqrt{\frac{\pi}{1+\alpha}}\exp \left(-\alpha a^2-\alpha b^2(1+\alpha)^{-1} \right)
$$
We now integrate $I$ from eq. (1)
$$\tag{3}
-\int d\alpha  \ I(\alpha)+C=\int\limits_{-\infty}^\infty \frac{dx}{x^2+a^2} \ \exp \left( -(x+b)^2-\alpha(x^2+a^2) \right)
$$
Where $C$ is an $\alpha$ independant integration constant. The RHS, evaluated at $\alpha=0$, is the integral we seek. We can also integrate $I$ from eq. (2) in terms of the error function, $\operatorname{erf}$.
$$\tag{4}
-\int d\alpha  \ I(\alpha)+C=-\frac{\pi}{2a}e^{a^2-b^2-2iab}\left[1-E_-+e^{4iab}(E_+-1) \right]+C
$$
All instances of $a$ and $b$ are to be understood as $|a|$ and $|b|$, and $E_\pm$ are abbreviations for
$$
E_{\pm}=\operatorname{erf}\left[\frac{ib\pm a(1+\alpha)}{\sqrt{1+\alpha}} \right]
$$
Notice that the RHS of eq. (3) $\to 0$ when $\alpha \to \infty$, thus the constant $C$ is found by evaluating eq. (4) at $\alpha \to \infty$ and setting the result to zero.
$$
C=\frac{\pi e^{a^2-b^2-2iab}}{a}
$$
Putting it together and evaluating at $\alpha=0$
$$
\int\limits_{-\infty}^\infty dx \ \frac{e^{-(x+b)^2}}{x^2+a^2} =\frac{\pi e^{(a-ib)^2}}{2a} \left[1-\operatorname{erf}(a-ib) +e^{4iab}(1-\operatorname{erf}(a+ib)) \right]
$$
The RHS is purely real, despite appearances.
A: May be, we could try to expand the exponential as
$$e^{-\sigma ^2 (x+b)^2}=e^{-\sigma ^2 x^2}\sum_{n=0}^\infty (-1)^n P_n(x)\, b^n$$ and face integrals
$$I_n=\int_{-\infty}^\infty \frac {x^n} {x^2+a^2}e^{-\sigma ^2 x^2}\, dx=a^{n-1}\int_{-\infty}^\infty \frac{t^n}{t^2+1}e^{-k t^2}\,dt\qquad \text{where}\qquad k=a^2\sigma ^2$$ For sure, for odd $n$, the result is zero
$$I_{2n}= e^k \,\Gamma \left(\frac{2n+1}{2}\right)\, \Gamma \left(\frac{1-2n}{2},k\right)$$
Let $k=c^2$ and the $I_{2n}$ write
$$I_{2n}=(-1)^{n+1} \Bigg[\frac{\sqrt \pi}{2^{n-1} c^{2 n-1} } Q_{n}(c)-\pi  e^{c^2} \text{erfc}(c) \Bigg]$$
$$\left(
\begin{array}{cc}
n & Q_n(c) \\
 1 & 1 \\
 2 & 2 c^2-1 \\
 3 & 4 c^4-2 c^2+3 \\
 4 & 8 c^6-4 c^4+6 c^2-15 \\
 5 & 16 c^8-8 c^6+12 c^4-30 c^2+105 \\
 6 & 32 c^{10}-16 c^8+24 c^6-60 c^4+210 c^2-945 \\
 7 & 64 c^{12}-32 c^{10}+48 c^8-120 c^6+420 c^4-1890 c^2+10395 \\
 8 & 128 c^{14}-64 c^{12}+96 c^{10}-240 c^8+840 c^6-3780 c^4+20790 c^2-135135 
\end{array}
\right)$$
where clear and simple patterns appear.
