I have a question regarding the formula $$\int_{0}^{\infty}\int_{0}^{\infty}\sin(xy)xf(x)\,\mathrm dx\,\mathrm dy=\int_{0}^{\infty}f(x)\,\mathrm dx.$$ I derived it this by moving integrals inside each other (even when the requirements for Fubini’s Theorem are not met), assuming the inverse of the forward Fourier transform of a function is equal to that function, and assuming that $$\int_{0}^{\infty}\frac{\sin\left(ax\right)}{x}\,\mathrm dx = \frac{\pi}{2}, \forall a.$$ The formula seems to work for MOST functions I tested, like $e^x$, $e^{-x^2}$, $\frac{1}{x^2+1}$, et cetera. However, it doesn’t work for some functions even tough they have a convergent area above the positive real axis, for example, $f(x)=\frac{\sin x}{x}$.
My question is, what is the rigorous proof for this formula and for what functions does it apply to?