Say we have a vector function $\vec{D}$ defined in some region on whose boundary its divergence goes to infinity and inside we have $\nabla \cdot \vec{D}=\rho$.
Then is it valid to use the Gauss divergence theorem here? That is can we say :
$\int_{V}(\nabla \cdot \vec{D}) d v=\int_{V} \rho d v$ , hence
$\int_{s}\vec D\cdot d \vec s =\int_{V} \rho d v$
(This is done by in his electrodynamics textbook)