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.  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.  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$.