Fourier transform of the distribution generated by Heaviside step function. Where is the mistake? I am trying to compute the Fourier transform of the Heaviside step function in the space of tempered distributions. 
$$\langle \mathscr{F}(H), \varphi \rangle \stackrel{\mathrm{\mathscr{S}'(\mathbb{R})}}{=} \langle H, \mathscr{F}(\varphi) \rangle $$
Since $H(x)$ is a moderate function (at most polynomial divergence approaching infinity) I can write (Can I? I know that in $\mathscr{D}'$ I can since the distribution is regular but I'm not entirely sure about $\mathscr S '$)
$$= \int_{-\infty}^\infty H(x) \left( \int_{-\infty}^\infty \varphi(y) e^{-2 \pi i x y} dy \right) dx \stackrel{(1)}{=} \lim_{\varepsilon \to 0^+} \int_{0}^\infty e^{-\varepsilon x^2} \left( \int_{-\infty}^\infty \varphi(y) e^{-2 \pi i x y} dy \right) dx \\ \stackrel{(2)}{=} \lim_{\varepsilon \to 0^+} \int_{-\infty}^\infty \varphi(y) \left(  \int_{0}^\infty e^{-\varepsilon x^2}  e^{-2 \pi i x y} dx \right) dy $$
and that after some integration (completing the square in the exponent, changing the variable, integrating the inner integral and changing the variable again) becomes
$$= \lim_{\varepsilon \to 0^+} \frac{1}{2\sqrt{\pi}} \int_{-\infty}^\infty \varphi \left(\frac{\sqrt{\varepsilon}}{\pi}u\right) e^{-u^2}du \stackrel{(3)}{=} \frac{1}{2} \varphi(0) = \frac{1}{2} \langle \delta, \varphi \rangle $$
In (1) I am using the monotone convergence theorem (edit: as was pointed out in the comments dominated convergence here as well), in (3) the dominated convergence theorem and in (2) Fubini's theorem.
Usually one manages to lose the delta part along the way but I managed to lose the $ \sim \frac{1}{x}$ part.
Where does this approach go wrong?
 A: The devil is in the details. When you write the integral
$$\int_0^{\infty} \exp(-(x-iy)^2)$$
you can not simply say that 
$$\int_0^{\infty} \exp(-(x-iy)^2) = \frac 12 \int_{-\infty}^{\infty} \exp(-(x-iy)^2)=\frac{\sqrt \pi}{2},$$because it is false.
In fact, you obtain the imaginary error-function $\operatorname {erfi}$:
$$\int_0^{\infty} \exp(-(x-iy)^2) = \frac 12 \int_{-\infty}^{\infty} \exp(-(x-iy)^2)=\frac 12 \sqrt \pi (1+i\operatorname {erfi}(y)),$$
and this additional complex-valued term would - after some manipulations  - yield you the principal value of $\frac 1x$.
In my opininion, a safer way to deduce the Fourier transform would be to use the $sign$ function:
$$H(x) = \frac 12 (1+ sign(x)),$$
and for the sign function you write that $( sign (x))' = \delta _0$,
hence $i \xi F[ sign (x)](\xi) = F[\delta_0] = 1$. Then you can apply the well-known idea about the division by $\xi$ to get $$F[ sign (x)](\xi) = -i\,pv(1/\xi) + C\delta_0.$$
The sign function is odd, hence its Fourier transform must also be odd, so $C=0$.
Finally, $$F[H] = F\left[\frac 12 (1+ sign(x))\right] = \frac 12 (\delta_0 - i\,pv(1/\xi)).$$ The exact constants depend, of course, on your normalisation of the Fourier transform.
