Problem about uniform continunity on $[0,\infty)$

Fix $\varepsilon>0$. Since $f$ is uniformly continuous, there exists $\delta>0$ such that $x,y\geq 0$ and $|x-y|<\delta$ implies that $|f(x)-f(y)|<\varepsilon$.

Now choose $m\in\mathbb{N}$ such that $\frac{1}{m}<\delta$, and let $x_1=\frac{1}{m},x_2=\frac{2}{m},\dots,x_m=1$. By hypothesis, for each $1\leq i\leq m$ we can choose an $N_i$ such that $|f(x_i+n)|<\varepsilon$ for all $n\geq N_i$. Taking $N=\max\{N_1,\dots,N_m\}$, it follows that $$ |f(x_i+n)|<\varepsilon $$ for all $n\geq N$, and all $1\leq i\leq m$.

For the last step, suppose that $x>N$. There is an integer $n\geq N$ such that $y=x-n\in[0,1]$, hence there is some $i$ such that $|y-x_i|\leq \frac{1}{m}<\delta$. Therefore also $$|(x_i+n)-x|=|(x_i+n)-(y+n)|<\delta$$ hence $$ |f(x)|\leq |f(x)-f(x_i+n)|+|f(x_i+n)|<\varepsilon+\varepsilon=2\varepsilon$$

Since $\varepsilon$ was any positive real number, this shows that $\lim_{x\to\infty}f(x)=0$.