The one-dimensional fundamental theorem (with a Lebesgue integral on the right hand side) holds in greatest generality when the derivative $f'$ (taken in the sense of distributions) is a measure -- such functions are called ``bounded variation''. For example, if $f$ is nondecreasing, it is measurable, locally bounded and therefore a distribution. By taking difference quotients, $f'$ is a non-negative distribution and hence a measure (as one can show with the Riesz Representation theorem). You can prove the formula $f(b) - f(a) = \int_a^b f'(x) dx$ at points $a$ and $b$ to which the measure $f'(x)$ does not assign positive mass (the case $f'$ being in $L^1 $ is exactly when $f$ is absolutely continuous). One proof is by convolving with a mollifier, quoting the result for smooth functions, then put the dual mollifier on the characteristic function of [a,b]. The mollifier converges to the characteristic function everywhere but the endpoints, and, say, the dominated convergence theorem allows you to take the limit as long as $a$ and $b$ do not have positive mass with respect to $f'$. But if you take the Heaviside function, its derivative is a delta function, and the formula essentially fails if you try to use $0$ as an endpoint. However, even in cases like this one the formula works for any $a, b$ not equal to $0$. The step to prove it for smooth compactly supported functions may be done by applying the dominated convergence theorem to $\int (f(x+h) - f(x))/h~ dx$ as $h$ tends to $0$. I think that no matter how you try to prove the fundamental theorem, the mean value theorem will enter in somewhere (here it enters to bound the difference quotients).