In ordinary calculus, the following identity holds true
$$\nabla\cdot(f\times g)=f\cdot(\nabla\times g)-g\cdot(\nabla\times f)$$
where $f,g$ are vector fields in $\mathbb{R}^3$, $\nabla\cdot$ denotes the divergence operator and $\nabla\times$ the curl operator. I'm interested in this identity because, integrating both sides and using Stokes theorem, it leads to
$$\iiint_V f\cdot(\nabla\times g)\,\mathrm{d}V=\iiint_V g\cdot(\nabla\times f)\,\mathrm{d}V - \iint_{\partial V}(f\times g)\cdot\mathrm{d}S,$$
where $V$ is a compact three-dimensional region with frontier $\partial V$. In turn, this expression says that if either $f$ or $g$ vanish along the frontier then one may safely swap the two fields within the integrals and get the same result. This property possesses some applications, e.g., in the analysis of electromagnetic fields.
It would be nice to see the same result in a more general setting, namely when $f,g\in\Gamma(TM)$ are vector fields on a tangent bundle $TM$ of an oriented Riemannian manifold $M$ (assuming perhaps that they have a compact support). For that to hold, one might want to assume that there exists a vector field $h$ such that
$$\langle f,\mathrm{curl}\, g\rangle - \langle g,\mathrm{curl}\, f\rangle = \mathrm{div} \,h.$$
So, my question is as to whether one such field exists. Notice that, if it does, then upon integration and by use of Stokes theorem on manifold, we would get
$$\int_V \langle f,\mathrm{curl}\, g\rangle \mathrm{d\,vol} = \int_V \langle g,\mathrm{curl}\, f\rangle \mathrm{d\,vol} - \int_{\partial V} \langle h,\mathrm{d\,sur}\rangle,$$
where the symbol $\langle\star,\star\rangle$ denotes the Riemannian metric that the manifold is equipped with.
Therefore, in order to conclude that we are allowed to swap the vector fields when one of them (say, $f$) is zero on the frontier $\partial V$, it is not necessary to know the exact structure of the vector field $h$, as it would suffice to know that it depends on $f$ only (meaning that it does not depend on any of its derivatives) and it is linear in $f$.
I tried to work out the problem myself and here's what I came up with. First of all, recall that
$$\mathrm{curl} f(v) = \nabla_vf - \nabla_v^\dagger f,$$
where $\nabla$ denotes a covariant derivative and the superscript $^\dagger$ denotes the adjoint with respect to the metric $\langle\star,\star\rangle$ and $v$ is a dummy vector (field). From this definition we get that
$$\langle f,\mathrm{curl}\, g\rangle - \langle g,\mathrm{curl}\, f\rangle = \langle f,\nabla g\rangle - \langle f,\nabla^\dagger g\rangle - \langle g,\nabla f\rangle + \langle g,\nabla^\dagger f\rangle.$$
Now, it suffices to recall that the adjoint of a covariant derivative is
$$\nabla^\dagger_v f = -\,\mathrm{div}(v)f - \nabla_v f$$
and to plug it in, to get
\begin{equation} \langle f,\mathrm{curl}\, g\rangle - \langle g,\mathrm{curl}\, f\rangle = 2\langle f,\nabla g\rangle - 2\langle g,\nabla f\rangle. \end{equation}
Although this expression is clearly not what I was hoping for, it shows some good signs. First, the terms in $\mathrm{div}(v)$ cancel out as it should be. Second, the right-hand side is antisymmetric in the pair $(f,g)$ as it should.
Here's where I got stuck at. Any comments will be appreciated :)
EDIT: I've made some progress on this problem. Let's assume there exists a bilinear operator $\kappa:TM\times TM\to TM$ with the following properties
$$\kappa(a,b) = -\kappa(b,a),$$ $$\langle a,\kappa(b,c)\rangle = \langle b,\kappa(a,c)\rangle,$$ $$\nabla\kappa(a,b) = \kappa(\nabla a,b) + \kappa(a,\nabla b),$$
for any tangent vector (field) $a$, $b$, $c$. Now, set the sought-for $h$ as
$$h = 2\,\kappa(f,g).$$
By bilinearity it holds that
$$\nabla h = 2\,\kappa(\nabla f,g) + 2\,\kappa(f,\nabla g) = 2\,\kappa(f,\nabla g) - 2\,\kappa(g,\nabla f),$$
where the last equality follows from anti-symmetry. Taking the inner product of both sides with a dummy vector $v$ yields
\begin{equation} \begin{split}\langle v,\nabla h\rangle =&\ 2\,\langle v,\kappa(f,\nabla g)\rangle - 2\,\langle v,\kappa(g,\nabla f)\rangle\\ =&\ 2\,\langle f,\kappa(v,\nabla g)\rangle - 2\,\langle g,\kappa(v,\nabla f)\rangle \\ =&\ 2\,\langle \nabla g,\kappa(v,f)\rangle - 2\,\langle \nabla f,\kappa(v,g)\rangle, \end{split} \end{equation}
where $\nabla$ stands for $\nabla_v$. The left-hand side is related to $\mathrm{div}\, h$. The existence of $\kappa$ and the interpretation of $\kappa(v,.)$ are open yet.