The step function
$$u(t)=\begin{cases}
1,& t\ge0\\
0,& t<0
\end{cases}$$
has the Fourier transform $$U(\omega)=\frac{1}{i\omega}+\pi\delta(\omega)$$
I leave it to you to find out how (it is not difficult!).
Now considering the definition of convolution, we can write the given integral as follows:
$$f(t)=\int_{-\infty}^t g(\tau) \mathrm d\tau = \int_{-\infty}^{+\infty} g(\tau)u(t-\tau) \mathrm d\tau=g(t)*u(t)$$
Using the convolution theorem, we have $F(\omega)=G(\omega)U(\omega)$. That is
$$F(\omega)=\frac{G(\omega)}{i\omega}+\pi G(\omega)\delta(\omega)$$
and since $\delta(\omega)$ is only nonzero at $\omega=0$, it simplifies to
$$F(\omega)=\frac{G(\omega)}{i\omega}+\pi G(0)\delta(\omega)$$
For example, if $g(t)=u(t)$, then $u*u=tu(t)$. I showed in THIS ANSWER that in distribution
$$\mathscr{F}{ u*u}=\left(-\frac1{\omega^2}\right)+i\pi \delta'(\omega)\tag1$$
where $\left(-\frac1{\omega^2}\right)$ is the distributional derivative of $\text{PV}\left(\frac1{\omega}\right)$.
The right-hand side is obviously *not* equal to $\pi G(\omega)\delta(\omega)+\text{PV}\left(\frac{G(\omega)}{i\omega}\right)$.
– Mark Viola Jun 15 '21 at 18:03