Let $u:\mathbb{C}\to\mathbb{R}$ be a harmonic function and $u(0)=0$. Let $$ g(z)= 2 \int_{0}^z \frac{\partial u}{\partial z}(\xi)\,d\xi,$$ suppose we know that $g$ is analytic, show that $u$ is the real part of $g$ and $g(0) = 0$.
My approach:
I couldn't use the fact that $u$ is harmonic. Can someone give me some idea?