How 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.
$\lim_{x\to\infty}f(x)=0$ if and only if $\lim_{n\to\infty}f(x_n)=0$ for all sequences with $\lim x_n=\infty$. If there exist some $x\in\mathbb R$ for which $f(x)\neq0$, then let $x_n=x+nT$ and get a contradiction.