Take the function
$$f(x,y,z) = \frac{x}{\sqrt{x^2+y^2+z^2}}$$
And say we want to find $\frac{\partial f}{\partial x}$. If either of $y$ or $z$ are nonzero, then this is straightforward, as the function is differentiable; you get $\frac{y^2+z^2}{r^3}$. However, if $y = z = 0$, then
$$f(x, 0, 0) = \frac{x}{\sqrt{x^2}} = \textrm{sign}(x)$$
Strictly speaking, thus function is not differentiable at $x = 0$. However, we can informally say
$$\frac{d}{dx} \textrm{sign}(x) = 2\delta(x)$$
because
$$\int_a^b 2\delta(x) dx = \textrm{sign}(b)-\textrm{sign}(b)$$
since both the LHS and RHS are equal to $2$ when $a < 0 < b$, and $0$ when $a < b < 0$ or $0 < a < b$. Notice that $2$ is the "surface area" of a unit $0$-sphere; similar to how you have a $4\pi$ in your epression, the surface area of a unit $2$-sphere. This isn't a coincidence.
Anyway, putting these together, we see that
$$\frac{\partial f}{\partial x} = \frac{y^2+z^2}{r^3} + 2\delta(x) \chi(x,y,z)$$
where $\chi$ is the indicator function for the set $\{(x,0,0) : x\in\Bbb{R}\}$.
I hope this makes more sense now. Again, everything here was completely informal/heuristic.