It´s known that the divergence of the electric field at a certain point is given by this formula:
$$\nabla \cdot E=\dfrac{\rho (r)}{\epsilon_{0}}$$
Being $\rho (r)$ the volume charge density at that point.
According to this, What if there is zero volume charge density but non-zero surface charge density? Would have the electric field zero divergence at that point?
In this case, How does this fact conciliate with gauss law?
The gauss law is directly related to divergence theorem:
$$∭_{V}(∇⋅E) dV=∬_{S}E\cdot dS$$
If we have a surface charge distribution inside any closed surface, the first term would be zero because the divergence of any electric field created by any surface charge distribution would be zero. Therefore, the surface integral would be zero also, and, according to gauss law:
$$∬_{S}E\cdot dS=\dfrac{Q_{int}}{\epsilon_{0}}$$
There will be no net charge inside the volume closed by the surface, which is obviously not true. I suspect that this inconsistency has to do with the fact that, for proving gauss law, when we conclude that:
$$\nabla \cdot E=\dfrac{q}{\epsilon_{0}}\delta(r)$$
Being $\delta(r)$ tri-dimensional Dirac´s delta with $r=0$ at the point where the charge $q$ is located.
We subsitute $q$ by $\rho (r)dV$, And as long as $dV$ is a third-order infinitesimal, we obtain the divergence of an electric field common expression, but if we make the same substitution in case surface or linear charge distribution, the resulting expression has a Dirac´s delta.
This suggests to me that the expression of the divergence of the electric field I learned is incomplete, and It´s only valid for only volume charge distributions.