Vanishing at infinity implies uniform continuity Let $X$ be a metric space. Then each $f\in C_0(X)$ is uniformly continuous.
The first steps are clear. For fixed $\epsilon>0$ we take a compact $K$ such that $|f|<\epsilon$ outside of $K$. $f$ is uniformly continuous on $K$, hence we find $\delta>0$ such that $|f(x)-f(y)|<\epsilon$ if $|x-y|<\delta$ for $x,y\in K$.
Now the only problem is what to do if $|x-y|<\delta$ with $x\notin K, y\in K$. It is not guaranteed that there is a point $z$ of the boundary of $K$ nearby such that we can estimate $|f(x)-f(y)|\leq |f(x)-f(z)|+|f(z)-f(y)|$.
Can you help me? 
 A: This answer builds on Daniel Fischer's hint.
Given $\epsilon > 0$, take some compact $K$ such that $|f|  <  \epsilon/2$ on $X\setminus K$.
Then:
$\quad(1)$: There is some $\delta_1 > 0$ such that whenever $x,y \in K$ satisfy $|x-y|<\delta_1$ we have $|f(x)-f(y)|<\epsilon$.
This follows from the fact that continuous function are uniformly continuous on compact sets.
$\quad(2)$: Whenever $x,y\in X\setminus K$ we have $|f(x) - f(y)|\leqslant |f(x)|  + |f(y)| < \epsilon/2 + \epsilon/2 = \epsilon$.

Now, for each $x\in K$, the continuity of $f$ implies there is $\rho_x>0$ such that $|f(x)-f(y)|<\epsilon/2$ whenever $|x-y|<\rho_x$.
The open balls $B\left(x;\frac12\rho_x\right)$ cover $K$, so by compacity there must be some finite subcover
$$K \subset \bigcup_{i=1}^n \, B\left(x_i;\frac12\rho_{x_i}\right).$$
Let $\delta_2 = \frac12\min\{\rho_{x_i}\,|\,i=1,\dots,n\}$.
Suppose $x\in K$ and $y\in X\setminus K$ are such that $|x-y|<\delta_2$.
There is some $i\in\{1,\dots,n\}$ with $x \in B\left(x_i;\frac12\rho_{x_i}\right)$, that is, $|x-x_i|<\frac12\rho_{x_i}$.
Then
$$|x_i - y|\leqslant |x_i - x| + |x - y| < \frac12\rho_{x_i} + \delta_2 \leqslant \rho_{x_i},$$
and hence
$$|f(x) - f(y)|\leqslant |f(x)-f(x_i)|+|f(x_i)-f(y)| < \epsilon/2 + \epsilon/2 = \epsilon.$$

Together with $(1)$ and $(2)$, the argument above shows that whenever $x,y \in X$ satisfy $|x-y|<\delta = \min\{\delta_1,\delta_2\}$, they also satisfy $|f(x)-f(y)|<\epsilon$.
In other words, $f$ is uniformly continuous, as we set out to prove. $\square$
