How should one numerically integrate a complex exponential function like
$$ \int_{-\infty}^{\infty} \frac{e^{-ikt}}{1+t^2} dt$$
Using Euler's formula
$$\sum_{t=-\infty}^\infty \frac{\cos (kt) + i \sin (kt)}{1+t^2} \Delta t$$
does not seem to give the same result as the analytic answer, which is convergent and entirely real:
$$ \int_{-\infty}^{\infty} \frac{e^{-ikt}}{1+t^2} dt = \pi e^{-|k|}$$
First you can use the symmetry to simplify it,
$$ \int_{-\infty}^{\infty} \frac{e^{-ikt}}{1+t^2} dt=\int_{-\infty}^{\infty} \frac{\cos(kt)}{1+t^2} dt-i\int_{-\infty}^{\infty} \frac{\sin(kt)}{1+t^2} dt$$
The second integral vanishes, since the sine function is odd on $\mathbb{R}$. We can fold the first integral since the cosine function is even on $\mathbb{R}$. Hence, we get
$$ \int_{-\infty}^{\infty} \frac{e^{-ikt}}{1+t^2} dt=2\int_{0}^{\infty} \frac{\cos(kt)}{1+t^2} dt$$
Now you have converted the complex integral into a real integral, so it is better for you can apply the numerical method to integrate it.