Assume a differential of the form $df(x,y) = X(x,y) \,dx + Y(x,y) \,dy$. If $\oint\ df=0$, it's easy to see that $\frac{\partial X}{\partial y} = \frac{\partial Y}{\partial x}$, which can be seen using Greene's theorem.
However, I want to show the stronger case that the line integral being $0$ implies $X = \frac{\partial f}{\partial x}$, and $Y = \frac{\partial f}{\partial y}$, making $df$ a total differential. Is this true, and how do you prove this?
Maybe we can use Green's Theorem to prove the partial derivative condition you're looking for. Let $\vec{F}(x,y)=\big<M(x,y),N(x,y)\big>$ be vector field such that $$l(x,y):=N_x(x,y)-M_y(x,y)$$ defines a continuous map on $\mathbb{R}^2$. Assume that $\int_{C}\vec{F}\cdot d\vec{r}=0$ for any closed curve $C$. Without loss of generaliy assume there exists $(x_0,y_0)\in\mathbb{R}^2$ such that $l(x_0,y_0)>0$ for some $(x_0,y_0)\in \mathbb{R}^2$. By continuity there must exist an open set $O$ containing $(x_0,y_0)$ such that $l(x,y)>0$ for any $(x,y)\in O$. Take $Q$ to be a closed curve that's contained in $O$, is oriented counter$-$clockwise, and encloses some region $R$. Then by Green's Theorem $$\int_{Q}\vec{F}\cdot d\vec{r}=\int\int_{R}l(x,y)dA>0$$ which is a contradiction, so $l(x,y)=0$ everywhere.