Suppose that $f:X \rightarrow \mathbb{R}$ is uniformly continuous, where $X$ is a compact metric space. By definition of uniform continuity, there exists $\delta$, independent of point chosen such that $d_X(x,y)<\delta \Rightarrow |f(x)-f(y)|<\epsilon$.
Question: Suppose that $x,y \in X$ such that $d_X(x,y) > \delta$. I want to show that $|f(x)-f(y)|< \epsilon^*$, where $\epsilon^*$ depends on $\epsilon$. Can I perform the followings?
Since $y \notin B(x,\delta)$, choose $x_1 \in B(x,\delta)$ and consider $B(x_1,\delta)$. If $y \in B(x_1,\delta)$, then we have $|f(x)-f(y)|<2 \epsilon$. Otherwise, choose $x_2 \in B(x_1, \delta)$ and consider $B(x_2, \delta)$. If $y \in B(x_2, \delta)$, then we have $|f(x)-f(y)|<3 \epsilon$. Generally, if $y \in B(x_n,\delta)$, then $|f(x)-f(y)|<(n+1) \epsilon$.
I am wondering whether this process terminates for some $n_0 \in \mathbb{N}$. I think the answer is yes since $X$ is compact.
If $X $ is compact, there exists $k>0$ with $d (x,y)<k $ for all $x,y $. So you can take $\epsilon^*=k $, or you can choose any $n $ such that $n \epsilon >k $.