Consider $\mathbb{R}$ as a $\mathbb{Q}$-vector space, and let $\mathcal{B}$ be a Hamel basis. Then define $f : \mathbb{R} \to \mathbb{R}$ by
$$ f(x) = \mathtt{safeinv}(\mathtt{L_1}(x)), $$
where
$$
\mathtt{safeinv}(x) = \begin{cases} \frac{1}{x}, & x \neq 0, \\ 0, & x = 0 \end{cases}, \qquad
\mathtt{L_1}\left( \sum_{v\in\mathcal{B}} c_v v \right) = \sum_{v\in\mathcal{B}}|c_v|. $$
Since all but finitely many $c_v$'s are zero, $\mathtt{L_1}$ is well-defined and hence the same is true for $f$.
Let $N \geq 1$, and let $x_0, \ldots, x_N \in \mathbb{R}$ be arbitrary with $x_N \neq 0$. We write $x_k = \sum_{v \in \mathcal{B}} c_{k,v} v$ for each $k = 0, \ldots, N$. Then
\begin{align*}
f\left( \sum_{k=0}^{N} x_k n^k \right)
= \mathtt{safeinv}(y_n), \qquad
\text{where } y_n = \sum_{v\in\mathcal{B}} \left| \sum_{k=0}^{N} c_{k,v} n^k \right|.
\end{align*}
Since $c_{N,v} \neq 0$ for some $v$, it follows that $y_n \to \infty$. Hence,
$$ \lim_{\mathbb{N} \ni n \to \infty} f\left( \sum_{k=0}^{N} x_k n^k \right) = 0. $$
On the other hand, note that we may have assumed at the beginning that $\mathcal{B}$ is unbounded above, i.e., there exists a positive sequence $(v_i)_{i\geq 1} \subset \mathcal{B}$ such that $v_i \to \infty$. Assuming indeed so,
$$ f(\lceil v_i \rceil^{-1/2} v_i) = \mathtt{safeinv}(\lceil v_i \rceil^{-1/2}) = \lceil v_i \rceil^{1/2} \to \infty, $$
whereas
$$ \lceil v_i \rceil^{-1/2} v_i \sim v_i^{1/2} \to \infty. $$
Therefore $f(x) \not\to 0$ as $x \to \infty$.