Continuous with compact support implies uniform continuity

Let $f:X\to\mathbf{R}$ satisfying your hypotheses. There exists $K$ compact s.t. $f_{|X \setminus K}=0$.

Let's show $f$ is uniformly continuous. Let $\epsilon>0$. By Heine theorem applied to $f_{|K}$, $f$ is uniformly continuous on $K$:

$$\exists \delta_1>0 \; \forall (x, y) \in K^2 \; d(x,y) < \delta_1 \implies |f(x)-f(y)| < \epsilon$$

If $(x, y) \in (X\setminus K)^2$, $\delta_1$ works.

Now suppose by contradiction that there exists $\epsilon>0$ s.t. for all $n \in \mathbf{N}$, there exists $x_n \in K$, $y_n \in X\setminus K$ s.t. $d(x_n, y_n) < 2^{-n}$ and $|f(x_n) - f(y_n)| > \epsilon$. $(x_n)$ lies in a compact space, so there exists $\sigma$ strictly increasing and $x \in K$ s.t. $x_{\sigma(n)} \to x$. Then $y_{\sigma(n)} \to x$, but $|f(x_{\sigma(n)}) -f(y_{\sigma(n)})| > \epsilon$, thus $f$ is not continuous in $x$, contradiction.

Hence:

$$\exists \delta_2>0 \; \forall (x, y) \in K \times (X \setminus K) \; d(x,y) < \delta_2 \implies |f(x)-f(y)| < \epsilon$$

Finally $\delta = \min(\delta_1, \delta_2)$ works.