In the Landau's book "Electrodynamics of Continuous Media" he derives the relation between the polarisation $\vec P$ and the dipole moment $\vec p$. Starting with the definition of the dipole moment:
$\int \vec r \rho dV = -\int \vec r (\nabla \cdot \vec P) dV = \oint \vec r(d\vec f \vec P) + \int(\vec P \nabla) \vec r dV$ where $\rho$ is the charge density, $d\vec f$ is the surface element. Landau says the integral over the surface vanishes: $\oint \vec r(d\vec f \vec P) = 0$.
Q: why does the integral over the surface equal $0$? In a dielectric, in the electric field there are only surface charges. Thus I would conclude that $\oint \vec r(d\vec f \vec P)$ gives the total dipole moment because $d\vec f \cdot \vec P$ is the infinitesimally small charge at some point on the surface .