Assertion A below applies to g=f', proving the desired result.
Assertion A: Let $g$ denote a continuous function such that $\liminf\limits_{t\to\infty}g(t)\leqslant0\leqslant\limsup\limits_{t\to\infty}g(t)$. There exists a sequence $(t_n)$ such that $t_n\to+\infty$ and $g(t_n)\to0$ when $n\to\infty$.
Assertion A follows from Assertion B below:
Assertion B: Let $(a_n)_{n\geqslant1}$ denote any positive sequence such that $a_n\to0$. There exists a sequence $(t_n)_{n\geqslant1}$ such that $t_n\geqslant n$ and $|g(t_n)|\leqslant a_n$ for every $n\geqslant1$.
The proof of Assertion B uses the two elementary facts below:
Fact 1: The limsup of $g$ is nonnegative hence for every positive $u$ and $T$ there exists $s\geqslant T$ such that $g(s)\geqslant-u$.
Fact 2: The liminf of $g$ is nonpositive hence for every positive $u$ and $T$ there exists $s\geqslant T$ such that $g(s)\leqslant u$.
We now prove Assertion B.
Fact 1 for $u=a_1$ and $T=1$ yields the existence of some $r_1\geqslant1$ such that $g(r_1)\geqslant-a_1$. Fact 2 for $u=a_1$ and $T=r_1$ yields the existence of some $s_1\geqslant r_1$ such that $g(s_1)\leqslant a_1$.
Assume that $n\geqslant1$ is such that there exists $s_n\geqslant r_n\geqslant n$ such that $g(r_n)\geqslant-a_n$ and $g(s_n)\leqslant a_n$, for example $n=1$. If $g(r_n)\leqslant a_n$, let $t_n=r_n$, then $-a_n\leqslant g(t_n)\leqslant a_n$. Otherwise, $g(r_n)\gt a_n\geqslant g(s_n)$ hence, by continuity of $g$, one can choose $t_n$ in $[r_n,s_n]$ such that $g(t_n)=a_n$.
Applying fact 1 to $u=a_{n+1}$ and $T=1+s_n$, one gets some $r_{n+1}\geqslant1+s_n\geqslant n+1$ such that $g(r_{n+1})\geqslant-a_{n+1}$. Likewise, applying fact 2 to $u=a_{n+1}$ and $T=r_{n+1}$, one gets some $s_{n+1}\geqslant r_{n+1}\geqslant n+1$ such that $g(s_{n+1})\leqslant a_{n+1}$.
Applying this procedure recursively, one sees that Assertion B holds.