I will not try to state the most general form of Green's Formula (Theorem) but will be content with integrating smooth functions (forms) with respect to smooth closed curves. First, let's recall Green's Formula for simple curves:
$$
\int_{\Gamma} Ldx + Mdy= \iint_D \left(\frac{\partial M}{\partial x} - \frac{\partial L}{\partial y}\right)dxdy
$$
where $\Gamma$ is a (positively oriented) simple closed curve in the $xy$-plane and $D$ is the domain bounded by $\Gamma$.
I will explain the generalization of this formula to non-simple curves in three steps.
First of all, we need to make sense of the curve and the domain that it bounds. Let $S^1$ be the (positively oriented) unit circle in the $uv$-plane and
$\gamma: S^1\to {\mathbb R}^2$ be a smooth map. This map can be regarded as a (potentially nonsimple) closed curve in the plane. Such a map $\gamma$ always extends to a smooth map $h: D^2\to {\mathbb R}^2$, where $D^2$ denotes the unit disk bounded by the unit circle. In fact, it does not matter which extension you take, as long as it is smooth. In the special case when $\gamma$ defines a simple curve $\Gamma$, the latter bounds a domain $D$ in the $xy$-plane and one can take $h$ which is 1-1 and onto $D$. In general, you should regard the pair $(\gamma, h)$ as a replacement to the pair $(\Gamma, D)$ in the case of simple closed curves.
Next, we need to make sense of the integrand in the left-hand side of Green's Formula. I will assume that $L, M$ are smooth functions defined on an open subset $U$ of the $xy$-plane containing $h(D^2)$. (Yes, this is a tiny bit more than is required by the usual Green's Formula bit, as I said, I am not aiming for the most general result.) The expression $Ldx+Mdy$ still "makes sense" to the same extent that this expression makes sense in the usual Green's Formula. The right way to think of this expression is that it defines a differential form $\omega$ on $U$. But how are we supposed to integrate this expression along $\Gamma$ (which I did not even define!)? This is done by "change of variables" via the map $h$ which should be familiar from vector calculus, we write:
$$
\int_{S^1} (L(x(u,v), y(u,v)) \frac{\partial x}{\partial u}du + L(x(u,v), y(u,v)) \frac{\partial x}{\partial v} dv +
M(x(u,v), y(u,v)) \frac{\partial y}{\partial u}du + M(x(u,v), y(u,v)) \frac{\partial y}{\partial v} dv.
$$
Here I am using
$$
h(u,v)= (x(u,v), y(u,v)),
$$
our mapping $h$ as above. For future reference I will abbreviate the complicated integrand as
$$
P(u,v)du + Q(u,v)dv.
$$
In the notation of differential forms, this integral is denoted simply by
$$
\int_{S^1} \gamma^*\omega.
$$
This is the integral in left-hand side of Green's Formula. Of course, if you prefer, you use the usual angle parameterization of the unit circle by the angular parameter $\theta\in [0, 2\pi]$ and then rewrite this integral as
$$
\int_{0}^{2\pi} F(\theta)d\theta
$$
for a suitable function $F$.
- Now, we need to make sense of the right-hand side. There are two ways to proceed, one is to take the expression
$$
P(u,v)du + Q(u,v)dv= h^*\omega
$$
computed earlier and apply to it the same formula as in the case of the usual Green's Formula. We obtain:
$$
\left(\frac{\partial Q}{\partial u} - \frac{\partial P}{\partial v}\right) dudv.
$$
Alternatively, we can first convert the differential form $Ldx + Mdy$ in the domain $U$ into the familiar expression
$$
\left(\frac{\partial M}{\partial x} - \frac{\partial L}{\partial y}\right)dxdy.
$$
After that, we make the change of variables $x=x(u,v), y=y(u,v)$ and
$$
dxdy= J_h dudv
$$
where $J_h$ is the Jacobian determinant familiar from the change of variables in 2-dimensional integrals. What you obtain as the result is exactly the same form as computed
earlier:
$$
\left(\frac{\partial Q}{\partial u} - \frac{\partial P}{\partial v}\right) dudv.
$$
In the language of differential forms this equality (which at first looks like a remarkable coincidence) reads as
$$
dh^*\omega= h^* d\omega
$$
Then integrate this expression over the unit disk $D^2$. The result is the right-hand side of the formula.
Green's Formula generalized to non-simple curves then (unsurprisingly) reads:
$$
\int_{S^1} P(u,v)du + Q(u,v)dv= \iint_{D^2} \left(\frac{\partial Q}{\partial u} - \frac{\partial P}{\partial v}\right) dudv.
$$
In the language of differential forms, it is written as
$$
\int_{S^1} \gamma^*\omega =\iint_{D^2} d h^*\omega=\iint_{D^2} h^*(d\omega).
$$
This formula is a special case of the more general Stokes' Formula which is best written using the language of differential forms.
You can find details in Spivak's book "Calculus on Manifolds." See also the discussion in this MSE question.