In Cartan's book there is a proof that considers $\omega=Pdx + Qdy$, but I want to consider $\omega=f(z)dz$ (even though that's the same, I know). The proof I have doesn't work at one point because I would need that (given $h=x+iy$ the small increment) $\frac{|x|+|y|}{h} \to 1$, which isn't true.
So I would like to prove the statement in the theorem, that is
"If given a differential form $\omega=f(z)dz$ we have that $\int_{\partial R} \omega =0$ with $\partial R$ the boundary of a rectangle in an open disc $U \subset \mathbb{C}$, then $\omega$ is exact in $U$"
This is my attempt:
I define $F(z)= \int_{\gamma} \omega$, where $\gamma$ is a path connecting a point $z_0$ (fixed) and $z$ through the sides of the rectangle whose vertices are $z_0$ and $z$. Then I take $z+h$ and I obtain:
$$F(z+h)-F(z)= \int_{\gamma_{h}} \omega$$
where $\gamma_h$ is the path connecting $z$ and $z+h$ (let's say $h=h_1 + ih_2$). Adding and subtracting $f(z) \int_{\gamma_{h}} du = f(z)L(\gamma_h)$ I obtain
$$F(z+h)-F(z)=f(z)*L(\gamma_h) + \int_{\gamma_{h}} f(u)-f(z) du$$
where $f(z)$ is fixed and $L(\gamma_h)$ is the length of the path, which is $|h_1| +|h_2|$ because it follows the sides of a rectangle. Then I would like to divide by $h$ and conclude, but the problem is that $\frac{|h_1|+|h_2|}{h}$ doesn't tend to 1 in general, so I can't conclude.