A function vanishing at infinity is uniformly continuous If $f\in C_0(\mathbb{R})$ (i.e. $f$ continuous and for all $\varepsilon>0$ there is $R>0$ such that $|f(x)|<\varepsilon$ whenever $|x|>R$), then why is $f$ uniformly continuous? I know that we should somehow use that $f$ is "small" outside a compact interval (on which it is uniformly continuous), how can we nicely write down the $\delta$?

Just for completeness, here's a proof that works for any locally compact metric space $X$.

Thm: If $X$ is a locally compact metric space, then $C_c(X)$ is dense in $C_0(X)$ under the sup-norm.

For a proof, see, e.g., Proposition 4.3.5 in Folland, who uses a different definition of $C_0(X)$ than OP which, it can be checked, is equivalent for $X=\mathbb{R}$.
Now, the proof is pretty straightforward. The key idea is that, if a function can be uniformly approximated by uniformly continuous functions, then it is, itself, uniformly continuous.
Indeed, suppose $f \in C_0(X)$. Give me $\varepsilon>0$. I find $g \in C_c(X)$ with $\|g-f\|_\infty < \varepsilon$. The $g$ that I found is uniformly continuous on all of $X$. So, let me then find $\delta>0$ with $d(x,y) < \delta \implies |g(x)-g(y)| < \varepsilon$. Finally, given $d(x,y) < \delta$, the trivial estimate yields $|f(x)-f(y)| < 3\varepsilon$.
