I would like to know if the following property could hold.
Let $(X,d)$ be a compact metric space. Then for every $\epsilon >0$ there exists some $\delta >0$ and some continuous function $F:X\rightarrow \mathbb{R}$ such that for $x,y\in X$ it holds that $\vert F(x)-F(y)\vert <\delta$ implies $d(x,y)< \epsilon$.
I think such a property could hold if given $\epsilon>0$ we construct a finite open cover of $X$ with some balls of radius $\frac{\epsilon}{2}$, and then using some partition of unity argument construct a continuous function $F:X\rightarrow\mathbb{R}$ which takes a different integer value on each ball of the covering of $X$, an take $\delta =\frac{1}{2}$. Here the difficulty I'm facing is to deal with the points which are in two (or more) balls of the covering.
Is it possible to make this argument work? Could it be easier to construct such a function $F$ with values in $\mathbb{R}^{n}$ for some $n\ge 1$ instead?
It's not true, even for $\mathbb{R}^n$. Let $X = S^n$ be the unit $n$-sphere with its usual Euclidean metric $d$ and choose any $\epsilon < 2$. If $F : S^n \to \mathbb{R}^n$ is continuous, the Borsuk-Ulam theorem says there exist antipodal points $x, -x \in S^n$ for which $F(x) =F(-x)$. So we have $|F(x) - F(-x)| = 0 < \delta$ no matter what $\delta$ is, but $d(x, -x)=2 > \epsilon$.
For your $n=1$ version it reduces to the intermediate value theorem. Take $X = S^1$ (or $S^m$), let $F : X \to \mathbb{R}$ be continuous, and let $G(x) = F(x) - F(-x)$. Pick any $x_0 \in X$. If $G(x_0)=0$ we are done. Otherwise we have $G(-x_0) = -G(x_0)$ and so $G(x_0) > 0 > G(-x_0)$ or vice versa. Since $X$ is connected, the intermediate value theorem guarantees some $x_1 \in X$ with $G(x_1)=0$.