As you pointed out, $y=f\left(u\right)$ is a static map, hence it does not represent in any way the temporal evolution of a dynamical system.
With this in mind, resorting to an observer is fundamentally a wrong approach. An observer, in fact, provides you with an estimate of the temporal evolution of the dynamical system under subject; however, here $f\left(\cdot\right)$ has nothing to do with the time.
Thereby, you ought to fit a static map. There exist a plethora of methods to achieve this goal but you have to switch from designing an observer to a context where you deal with fitting.
You're already equipped with good knowledge to start: you essentially know the bases $b_1 = -v$, $b_2 = \exp(-v)$, and $b_3 = 1 / \left(v+1\right)$, where $v = u^2$.
You could then try to explore whether a linear combination of $b_i$ fits well $f$, or if you need to resort to polynomial fitting or even nonlinear fitting (e.g. by means of multilayer neural networks).
Once done, you can extract the gradient out of the fitted model.
If you want to fit directly the gradient $g = df/dx$, to avoid problems related to divisions by zero, you could:
- feed in $x_i = at_i+b$, with $a>0$ and $b<0$ (to explore the whole range);
- read back $y_i = f\left(x_i\right)$;
- compute $\dot{\tilde{y}}_i = \left(y_i-y_{i-1}\right)/\Delta t$;
- compute $g_i = \dot{\tilde{y}}_i / a$;
- fit $g$ based upon the sampled points $g_i$ exploiting the same techniques discussed above.