Solution (source code)

= Solution

Use the sign convention in the question: the <Hilbert transform> kernel is $(y-x)^{-1}$, the negative of another common convention. A contour indentation at the origin gives
$$
\operatorname{pv}\int_{\mathbb R}\frac{e^{isy}}{y-x}\,dy=i\pi\operatorname{sgn}(s)e^{isx}.
$$
For $s>0$ close the contour in the upper half-plane; for $s<0$ close it below. Thus the transform of $\sin(sx)$ is $\cos(sx)$ for $s>0$. Since $(1-\cos x)/x=\int_0^1\sin(sx)\,ds$, integration of this multiplier identity, justified first with an Abel regularization, yields
$$
\boxed{\widehat f(x)=\frac{\sin x}{x},\qquad\widehat f(0)=1.}
$$
The value at zero also follows directly from $\pi^{-1}\int(1-\cos y)y^{-2}\,dy=1$.