I want to show that:
$(*)$If $\omega \in \Omega^{2}(M)$, which $M$ is compact Riemann surface and $\Omega^{2}(M)$ means 2-form, and $\int_{M} \omega =0$, then there exists a smooth function $f$(i.e. $f\in \Omega^{0}(M)$) such that $\omega=d*df$ .
I try to imitate the method of proof of the $\textbf{Hodge Decomposition}$:
Let $\omega \in A^1(\Sigma)$, then $$\omega=\omega_{h}+df+*dg,$$ where $\omega_{h}\in H^1$ and $f,g\in A^0(\Sigma).$
The proof of the Hodge Decomposition as following Three Steps:
Step 1. To establish a complete Hilbert space
Step 2. To seek $df, *dg$ (Similar to the existing of the solution of PDE)
Step 3. regularity. (To use the Weyl Lemma.)
Define $X=\{\phi \in \Omega^{0}(M): \int_{M} \phi d\sigma=0\}$ with $\int_{M}d\sigma=1$ and $\forall \psi, \phi \in X$, define the inner product, $$(\psi,\phi)=\langle d\psi, d\phi\rangle=\int_{\Sigma} d\psi \wedge *d\phi.$$
We could show that $\bar{X}$ is a complete Hilbert space. Moreover, if $f\in \bar{X}$, then $f\in X$(i.e. $\bar{X}\subset L^2(X,d\sigma)$).
Then $\forall \phi \in C^{\infty}(X)$, we seek $g$ s.t. $$ \int_{\Sigma}d\phi \wedge \omega =\int_{\Sigma}d\phi \wedge *dg.$$ Here we could define a bounded linear functional $l$, which $$l: X\rightarrow \mathbb{C}$$ $$\phi \longmapsto \int_{\Sigma}d\phi \wedge \omega$$
Using the Resiz representation theorem, $\exists g\in \bar{X}$, s.t. $$l(\phi)=\langle \phi, \bar{g}\rangle, \forall g\in \bar{X}.$$ where using the regularity implies $g\in X$.
In the next, $$\int_{M}\phi \omega= \int_{M} f d*d\phi=\int_{M} d\phi \wedge *df \ (*),$$ we get $$ \int_{M} \phi (\omega-d*df)=0, \forall \phi \in C^{\infty}(X),$$ Hence, $\omega-*dg$ is closed form. Finished the proof of Hodge theorem.
How to construct similarly of such linear functional to prove the problem $(*)?
Since $\int \omega = 0$, $\omega = d\alpha$ for some one form $\alpha$. Using the Hodge decomposition, $$\alpha = d^* \omega_1 + dg + \alpha_3, $$ where $\Delta \alpha_3 = 0$. Thus $$\omega = d \alpha = dd^*\omega_1 = \pm d(*d*\omega_1) = d *df,$$ where $f = \pm *\omega_1$.