I've been trying to compute the fourier transform of $\operatorname{sgn}(x)$, but I'm having trouble with the complex exponential at infinity. The issue is the following: by definition we have
$$(\mathcal{F}[\operatorname{sgn}(x)](k),\phi(k))=(\operatorname{sgn}(x),\mathcal{F}[\phi(k)](x))=\dfrac{1}{2\pi}\int_{-\infty}^{\infty}\int_{-\infty}^{\infty}\operatorname{sgn}(x)\phi(k)e^{ikx}dkdx.$$
If we apply the definition of $\operatorname{sgn}$, we can easily see that
$$(\mathcal{F}[\operatorname{sgn}(x)](k),\phi(k))=\dfrac{1}{2\pi}\int_{-\infty}^{\infty}\phi(k)\left(\int_{-\infty}^0-e^{ikx}dx+\int_{0}^\infty e^{ikx}dx\right)dk.$$
Now on the inner integrals, if we integrate directly we would have
$$\int_{-\infty}^0-e^{ikx}dx+\int_{0}^\infty e^{ikx}dx=\int_0^\infty e^{ikx}-e^{-ikx}dx,$$
but this is
$$\int_{-\infty}^0-e^{ikx}dx+\int_{0}^\infty e^{ikx}dx=2i\int_0^\infty \sin{kx}dx$$
which we know that doesn't exist.
In that sense something is clearly wrong here but I'm not being able to see what. I believe my method is totally wrong here, but I can't see why.
What am I doing wrong? And how can we compute this fourier transform correctly?