Generally, when we want to show continuity, we are given a small $\varepsilon$ and we pick a $\delta$ according to this $\varepsilon.$ Heuristically, we can consider this $\delta$ to be a function of $\varepsilon,$ which must decrease as $\varepsilon$ decreases, for example with the function $x \mapsto x$, we have $\delta(\varepsilon) = \varepsilon.$ I also see that with a constant function, we can pick $\delta$ to be any number we like, so in a way our function $\delta$ does not depend on $\varepsilon.$
My question is: Let $(X,d_x),(Y,d_Y)$ be metric spaces. If $f: X \to Y$ is a non-constant continuous function, must $\delta$ depend on $\varepsilon$?
I can see that if $X$ is infinite the answer is yes. Say we choose a $\delta>0$, and pick $x,x' \in X : d_X(x,x') < \delta,$ we can pick $\varepsilon = d_Y(f(x),f(x')),$ which means that this $\delta$ does not work for this $\varepsilon.$ I think the infinite set means that we can always pick $x,x'$ such that $f(x)\ne f(x')$, and $d_x(x,x')<\delta.$ I see that this argument does not work does not work if $X$ is finite though, as we can pick $\delta = \min_{x,x' \in X}\{d_X(x,x')\},$ so I worry that there is some weird finite set where we can pick a $\delta$ that works for all $\varepsilon.$
I know that thinking of $\delta$ as a function of $\varepsilon$ in this way isn't necessarily accurate, as it may imply that only one $\delta$ works for a $\varepsilon$, which is not true, but this isn't the point of my question.
EDIT: I think I have thought of a counter-example. Let $X = Y = \{0,1\}$ with the discrete metric. Let $f(x) = x.$ Then choosing $\delta = 1/2$ implies continuity, but $f$ is not constant.
Suppose there exists a point $x \in X$ where $\exists \delta > 0$ such that $\forall \epsilon > 0$, $$d(x,y) < \delta \implies |f(x) - f(y)| < \epsilon.$$ Take $\epsilon \to 0$, which immediately implies that $f$ is constant in a neighborhood of radius $\delta$ around $x$. (Either this means our neighborhood only contains $x$, or $f$ is constant on a set that doesn't just contain $x$.)