$f:\mathbb R \to \mathbb R$ is continuous and lim$_{n\to \infty} f(nx)=0$ for all real $x$ $\implies $ lim$_{x \to \infty}f(x)=0$
Here, I will prove Greg Martin's lemma, and thereby proving the theorem.
Suppose that the conclusion $f(x)\rightarrow 0$ is not true, then there is an $\epsilon>0$ such that $|f(x_j)|>\epsilon$ for infinitely many $x_j$ where $x_j\rightarrow\infty$ as $j\rightarrow\infty$.
By continuity of $f$, we have a disjoint set of open intervals $(a_j, b_j)$ such that $$ |f(x)| > \epsilon$$ for all $x$ in the union of $(a_j, b_j)$, and $a_j\rightarrow \infty$ as $j\rightarrow\infty$.
Without loss of generality, we can assume that $a_1>0$.
Let $[a,b]\subset (a_1, b_1)$ with $a\neq b$.
Now, here's the KEY IDEA:
There exist some $n$ such that $[na,nb]$ intersects $(a_j,b_j)$ for some $j>1$. This is possible because $n(b-a)\rightarrow \infty$ as $n\rightarrow\infty$. Let $n_1$ be the first $n$ with this property, and let $j_1$ be the corresponding $j$ for intersecting $(a_{j },b_{j })$.
The intersection must be nontrivial interval of positive length, therefore we can find a nontrivial closed interval $[c_1,d_1]$ such that $$[c_1,d_1]\subset [a,b]\cap (a_{j_1}/n_1, b_{j_1}/n_1).$$
The next step is almost identical to the previous step, but we require $j>j_1$. Indeed, there exist some $n$ such that $[nc_1,nd_1]$ intersects $(a_j,b_j)$ for some $j>j_1$. Then it gives a nontrivial closed interval $[c_2, d_2]$ such that $$[c_2, d_2]\subset [c_1, d_1]\cap (a_{j_2}/n_2, b_{j_2}/n_2).$$
By this construction, we obtain a nested intervals $$ [a,b]\supset [c_1,d_1] \supset [c_2,d_2]\supset \cdots $$
Then let $c\in \bigcap_j [c_j, d_j]$. For this $c$, we must have $|f(n_jc)|> \epsilon$ for all $j$. This contradicts the assumption $f(nc)\rightarrow 0$ as $n\rightarrow\infty$.