Let $f$ be a holomorphic complex function defined on the upper half-plane $\mathbb{H}$, i.e., $f:\mathbb{H} \rightarrow \mathbb{C}$.
Then, $f(z)dz$ can be written as follows $$f(z)dz=(u(x,y)+iv(x,y))(dx+idy)$$ Therefore, the real part of $f(z)dz$, denoted by $w$, is $u(x,y)dx-v(x,y)dy$, i.e., $$w=u(x,y)dx-v(x,y)dy$$ Let $A(x,y):=u(x,y)$ and $B(x,y):=-v(x,y)$, then we have:$$w=A(x,y)dx+B(x,y)dy$$ The conjugate of $w$, denoted by $w^*$, is $-B(x,y)dx+A(x,y)dy$, i.e., $$w^*=-B(x,y)dx+A(x,y)dy$$ It is well-known that $w$ is a harmonic $1-$ form if and only if $w$ and $w^*$ are both closed, i.e., $$dw=dw^*=0$$ that is equivalent to the following two conditions $$\frac{\partial A}{\partial y}=\frac{\partial B}{\partial x}$$ and $$\frac{\partial B}{\partial y}=-\frac{\partial A}{\partial x}$$ Am I correct or not?
If $f(z)$ is analytic then $f(z)dz$ is an analytic 1-form so $\Re(f(z)dz)$ is a harmonic 1-form. For a closed-loop we have $\int_\gamma f(z)dz=0\implies \int_\gamma \Re(f(z)dz)=0$ ie. $\Re(f(z)dz)$ is closed. It is also exact because $\Bbb{H}$ is simply connected: $F(s)=\int_{s_0}^s f(z)dz$ is well-defined and $\int_\gamma \Re(f(z)dz) = \Re(F(\gamma(1))-\Re(F(\gamma(0))$. An example of closed non-exact 1-form is $dz$ on $\Bbb{C/Z}$ or $\frac{dz}{z}$ on $\Bbb{C^*}$.