I think something is missing here. What is missing is that whether f(r) is zero at every single point in space or just at a particular distance.
There is another thing:
When you are integrating you are essentially summing up a multiplication of the function by very small differences in x.
Simply put: f(r)*dV is your differential.
If f(r) is always zero, why would the sum of zeroes equal to something non-zero?
Moreover the divergence is the integral of f(r) vector field over small parts of surface areas with a vector pointing outwards multiplying it (is inside the integral if it changes with respect to location in space).