In general, $f$ does not admit such a decomposition. If it does, $f=g+h=(g+m)+(h-m)$, so we can assume $g\ge0$ and $h\le0$, that is, any antiderivative $F$ of $f$ is bounded variation. But in general this is not the case for an everywhere derivable functionsfunction , e.g the function $F(x)=x^2\sin( 1/x^2)$ for $x\neq0$, $F(0)=0$.