Consider the function $f:\mathbb R\to\mathbb R$ given by $f(x)=\sin(\log(1+x^2))$.
It does not have a limit at $\pm\infty$ but its derivative
goes to zero as $x\to\pm\infty$.
Let me add how I came up with this function:
First, $\log(x)$ tends to infinity as $x\to\infty$ but its derivative goes to zero.
To make it behave well in both directions and at the origin, we change $x$ to $1+x^2$; note that $\log(x^2)=2\log(x)$ so the asymptotic behaviour is essentially the same.
Now we have a function that goes to infinity at infinity but the derivative goes to zero.
If we compose this with a nice smooth function that does not have a limit at infinity, we should be done.
And indeed, the function $f$ given above works.