Let $$H(t) = \begin{cases} 1 & t\gt0 \\ 0 & t\lt 0\end{cases}$$ I'm trying to find Fourier transform of $H(t).$ So we have $$\mathcal{F}\{H(t)\} = \int_{-\infty}^{+\infty}H(t)e^{-j\omega t}dt = \int_{0}^{+\infty}e^{-j\omega t}dt$$ Obviously this integral doesn't converge. So there are some ways to make this integral meaningful like introducing a damping factor. According to what I know from the distribution theory, If we want to view that as a distribution, we should see what happens when it acts on a test function $\phi(\omega)$. Then $$I =\int_{-\infty}^{+\infty}H(\omega)\phi(\omega)d\omega = \int_{-\infty}^{+\infty}\int_{-\infty}^{+\infty}H(t)e^{-j\omega t}dt\phi(\omega)d\omega = \int_{-\infty}^{+\infty}\int_{-\infty}^{+\infty}H(t)\phi(\omega)e^{-j\omega t}dtd\omega$$ Assuming changing order of integration is valid $$I = \int_{-\infty}^{+\infty}\int_{-\infty}^{+\infty}H(t)\phi(\omega)e^{-j\omega t}d\omega dt= \int_{-\infty}^{+\infty}H(t)\int_{-\infty}^{+\infty}\phi(\omega)e^{-j\omega t}d\omega dt$$ And I'm stuck here. The answer should be $$H(\omega) = \frac{1}{j\omega} + \pi\delta(\omega)$$I've seen many other pages on MSE related to this problem but didn't found an answer which continues my approach. Maybe I'm totally wrong?
Also in the distributional sense, it has been proved that $$H(\omega) = \pi \delta(\omega) + \mathrm{P} \frac{1}{j\omega}$$ So we have $\mathrm{P} \frac{1}{j\omega} = \frac{1}{j\omega}$?
I will denote the Fourier transform of $f$ by $\widehat{f}$, and I recall that by definition $$ \langle P(\tfrac{1}{x}),\varphi\rangle = \lim_{\varepsilon\to 0} \int_{|x|>\varepsilon}\frac{\varphi(x)}{x}\,\mathrm{d} x $$
So as you write, for any test function $\varphi\in C^\infty_c(\mathbb{R})$ we have $$ \begin{align*} \langle\widehat{H},\varphi\rangle &= \int_{\mathbb{R}} H(x)\,\widehat{\varphi}(x)\,\mathrm{d} x \\ &= \int_0^\infty\int_{\mathbb{R}} e^{-ixy}\varphi(y)\,\mathrm{d} y\,\mathrm{d}x \\ &= \lim_{n\to\infty} \int_0^n\int_{\mathbb{R}} e^{-ixy}\varphi(y)\,\mathrm{d} y\,\mathrm{d}x \end{align*} $$ Since $\varphi$ is compactly supported, there exists $a>0$ such that $\varphi=0$ out of $[-a,a]$, and since $\varphi$ and bounded, $$\int_0^n\int_{\mathbb{R}} |\varphi(y)|\,\mathrm{d} y\,\mathrm{d}x = \int_0^n\int_{-a}^a |\varphi(y)|\,\mathrm{d} y\,\mathrm{d}x < \infty $$ so we can use Fubini Theorem to get $$ \begin{align*} \langle\widehat{H},\varphi\rangle &= \lim_{n\to\infty} \int_{\mathbb{R}} \varphi(y) \int_0^n e^{-ixy}\,\mathrm{d}x\,\mathrm{d} y \\ &= \lim_{\varepsilon\to 0,\,n\to\infty} \int_{\varepsilon<|y|} \varphi(y)\, \frac{1-e^{-iny}}{i\,y}\,\mathrm{d} y \\ &= \langle P(\tfrac{1}{ix}),\varphi\rangle + \lim_{\varepsilon\to 0,\,n\to\infty} \int_{\varepsilon<|y|<a} \varphi(y)\, \frac{-e^{-iny}}{i\,y}\,\mathrm{d} y \end{align*} $$ Now remark that by doing the change of variable $y \to -y$ in the second integral when $y<0$, we have $$ \begin{align*} \int_{\varepsilon<|y|<a} \varphi(y)\, \frac{-e^{-iny}}{i\,y}\,\mathrm{d} y &= \int_{\varepsilon<y<a} \frac{\varphi(-y)e^{iny}-\varphi(y)e^{-iny}}{i\,y}\,\mathrm{d} y \\ &= \int_{\varepsilon<y<a} \frac{(\varphi(-y)-\varphi(0))\,e^{iny}-(\varphi(y)-\varphi(0))e^{-iny}}{i\,y}\,\mathrm{d} y \\ &\qquad + \varphi(0)\int_{\varepsilon<y<a} \frac{\,e^{iny}-e^{-iny}}{i\,y}\,\mathrm{d} y \\ &= \int_{\varepsilon<|y|<a} \psi(y)e^{-iny}\,\mathrm{d} y + \varphi(0)\int_{\varepsilon<y<a} \frac{2\sin(ny)}{y}\,\mathrm{d} y \end{align*} $$ where $\psi(y) = \frac{\varphi(0)-\varphi(y)}{iy}$ is a smooth function. To conclude remark that with $u = ny$ we get $$ \int_{\varepsilon<y<a} \frac{2\sin(ny)}{y}\,\mathrm{d} y = \int_{n\varepsilon<u<na} \frac{2\sin(u)}{u}\,\mathrm{d} u \underset{\varepsilon\to 0,\,n\to\infty}{\longrightarrow} \int_{0}^\infty \frac{2\sin(u)}{u}\,\mathrm{d} u = \pi $$ where one should first take the limit in $\varepsilon$ and then in $n$, while by Riemann-Lebesgue Lemma $$ \lim_{\varepsilon \to 0} \int_{\varepsilon<|y|<a} \psi(y)e^{-iny}\,\mathrm{d} y = \int_{|y|<a} \psi(y)e^{-iny}\,\mathrm{d} y\underset{n\to\infty}{\longrightarrow} 0 $$
Therefore $$\boxed{\langle\widehat{H},\varphi\rangle = \langle P(\tfrac{1}{ix}),\varphi\rangle + \pi\,\varphi(0)}$$ or equivalently, in the sense of distributions, we have the equality $$ \widehat{H} = P(\tfrac{1}{ix}) + \pi\,\delta_0 $$