Suppose that $f:\mathbb{R}\rightarrow \mathbb{R}$ is a periodic function such that $\displaystyle{\lim_{x\rightarrow +\infty}f(x)=0}$.
I want to show that $f(x)=0$ for all $x\in \mathbb{R}$.
$$$$
Let $T$ be the period of $f$, then $f(x)=f(x+T)$.
Therefore, we have that $$0=\lim_{x\rightarrow +\infty}f(x)=\lim_{x\rightarrow +\infty}f(x+T)=\lim_{x\rightarrow +\infty}f(x+2T)=\dots =\lim_{x\rightarrow +\infty}f(x+nT), \ \forall n\in \mathbb{Z}$$
So, $$|f(x)|=|f(x+T)|=|f(x+2T)|=\dots =|f(x+nT)|\leq \epsilon$$
$$$$
But how exactly do we conclude that $f(x)=0, \forall x\in \mathbb{R}$ ?
Let $x\in \mathbb{R}$. Then $x_n:=x+nT$ tends to $+\infty$ ($T$ is the period of $f$) and $f(x_n)=f(x)$ for all $n$, since $f$ is $T-$periodic. Since $\displaystyle \lim_{x\rightarrow +\infty}f(x)=0$, we get that $\displaystyle \lim_{n\rightarrow +\infty}f(x_n)=0$ and by the uniqueness of the limit, we get $f(x)=0$, as desired.