I am trying to prove that the function $f:\mathbb C\setminus\mathbb R\rightarrow\mathbb C$ defined by $$ f(z) := \frac{1}{2\pi i}\int_{-\infty}^\infty\frac{\exp(-|x|)}{x-z}dx $$ is holomorphic.
I tried to solve it by evaluating the integral. Since |x| introduces non-analicity, I tried dividing the integral into the intervals $(-\infty, 0]$ and $[0,\infty)$. I thought that I could calculate these integrals by using residue calculus, but I have never evaluated this kind of integrals.
I would appreciate if you could provide a clue (not necessarily a complete answer).
Edit: I corrected the problem statement.
As mrf suggest, one can use Fubini's theorem and Morera's one (in order to give a simple condition to check, which is more in the spirit of contour integrals).
An alternative way is to fix $z_0\in\mathbb C\setminus\mathbb R$, and a $\delta$ such that $B(z_0,2\delta)\subset\mathbb C\setminus\mathbb R$, say for each element $z$of this ball, we have $d(z,\mathbb C\setminus\mathbb R)\geqslant r>0$. Then we can prove that $$\lim_{h\to 0}\frac{f(z_0+h)-f(z_0)}h=\int_{-\infty}^{+\infty}\frac{e^{-|x|}}{(x-z_0)^2}\mathrm dx.$$