Fix $\epsilon>0$. We want to find $\delta>0$ such that

$$|x-y|<\delta\Rightarrow |f(x)-f(y)|<\epsilon$$

For every $N\in \Bbb N$, let $E_N=\{a\mid x\geq N\Rightarrow |f(x+a)-f(x)|\leq\epsilon/4\}$. $E_N$ is closed (by continuity of $f$) and $\bigcup_{N\in\Bbb N} E_N=[0,\infty)$. By Baire Category Theorem, at least one of them, say, $E_N$ contains a closed interval $[b,c]$. For $x,y\geq N+c$, without loss of generality, say $y\geq x$, if $|y-x|<c-b$, there always exists $z\geq N$ such that $[x,y]\subset[z+b,z+c]$. Then $|f(x)-f(y)|\le |f(x)-f(z)|+|f(y)-f(z)|=|f(z+d)-f(z)|+|f(z+e)-f(z)|\le \epsilon/2$ where $d,e\in [b,c]$. For $x,y\le N+c$, as $[0,N+c]$ is compact, $f $ restricted to $[0,N+c]$ is uniformly continuous, hence there exists $\delta'>0$ satisfing the requirements in the quote box. Let $\delta=\min(c-b,\delta')$, we are done.