Sure one can! Just note that $f$ can be written as the "convolution" of $-g$ with an appropriate integrable kernel, the Green function $G(x)$ for the flat torus:
$$f(x) = -\int_\Omega g(y) G(x - y) dy.$$
If $d \geqslant 3$, the Green function for a flat torus is equal to $$G(x) = c_d \sum_{n \in 2 \mathbb Z^d} (|x+n|^{2-d} - \alpha_n),$$ where $\alpha_n$ is the mean value of $|x+n|^{2-d}$ over $[-1,1]^d$. If $d = 2$, replace $|\cdot|^{2-d}$ by $-\log |\cdot|$.