Smoothness of $f$ is a distraction here. Let us assume that $f$ is continuously differentiable (and we only need this because we want to talk about $f'$, not for any good reason), so that $f'$ exists and is continuous. Then $B : =\{x \mid f'(x) \leq 0\}$ is a closed set, and the largest valid choice for $\delta(x)$ is just $d(x,B)$.
For any set $A$, the function $x \mapsto d(x,A)$ is a $1$-Lipschitz function, by the triangle inequality for metrics. So, essentially, we already get that $\delta$ can be chosen as nice as possible if we only require enough about $f$ to make $\delta$ well-definable.
Just for completeness, if we don't require $\delta(x)$ to be the maximal feasible value, we could make $\delta$ as nasty as we want, e.g. by moving to $\bar\delta$ where $\bar\delta(x) = \delta(x)$ if $x \in Z$ and $\bar\delta(x) = \frac{1}{2}\delta(x)$ if $x \notin Z$ for some horrible $Z$.