I am solving an inclusion problem in an infinite domain and the integral transformation linked below is appearing in all the problems. I don't understood how they are using the divergence theorem in a way that leaves the volume integral the same with one term's derivative transferred to the other term.
Here $dx$ and $dy$ are volume elements and the Green's function $G$ will be zero as $x$ tends to infinity.
Stripping away the superfluous tensors, the heart of the problem is to evaluate a set of integrals of the form $$u(\mathbf{x}) = \int_{\mathbb{R}^n}\left[\sum_{i=1}^n \left(\frac{\partial}{\partial y_i}f(\mathbf{y})\right)G(\mathbf{x},\mathbf{y})\right]dV(\mathbf{y}).$$
Although this does not look like a divergence, if we define the vector field $$\mathbf{w}(\mathbf{y}) = f(\mathbf{y})G(\mathbf{x},\mathbf{y})\mathbf{1}$$ with $\mathbf{1}$ the constant vector of all ones, then $$\nabla \cdot \mathbf{w} = \sum_{i=1}^n \left(\frac{\partial}{\partial y_i}f(\mathbf{y})\right)G(\mathbf{x},\mathbf{y}) + \sum_{i=1}^n f(\mathbf{y})\frac{\partial}{\partial y_i}G(\mathbf{x},\mathbf{y}).$$ Now as you say you cannot, strictly speaking, apply the divergence theorem to the infinite domain $\mathbb{R}^n$, but, if we write $B_k^n$ for the ball of radius $k$,
\begin{align*} u(\mathbf{x}) &= \lim_{k\to\infty} \int_{B_k^n}\left[\sum_{i=1}^n \left(\frac{\partial}{\partial y_i}f(\mathbf{y})\right)G(\mathbf{x},\mathbf{y})\right]dV(\mathbf{y})\\ &=\lim_{k\to\infty}\int_{\partial B_k^n}\mathbf{w}\cdot\mathbf{\hat{n}}\,dA(\mathbf{y}) - \lim_{k\to\infty}\int_{B_k^n}\left[\sum_{i=1}^n f(\mathbf{y})\frac{\partial}{\partial y_i}G(\mathbf{x},\mathbf{y})\right]dV(\mathbf{y})\\ &= -\int_{\mathbb{R}^n}\left[\sum_{i=1}^n f(\mathbf{y})\frac{\partial}{\partial y_i}G(\mathbf{x},\mathbf{y})\right]dV(\mathbf{y}), \end{align*} where the last equality makes use of the fact (surely established in some earlier part of the document that you didn't share) that $\mathbf{w}$ decays sufficiently quickly to zero as $\|\mathbf{y}\|\to\infty$.