If real $f$ is such that $\exists\delta>0:\ \forall\varepsilon>0,\vert x-y\vert<\delta\implies\vert f(x)-f(y)\vert<\varepsilon.$ Then $f$ is constant. 
Proposition: Suppose $f:\mathbb{R}\to\mathbb{R}\ $ has the property:
$$ \exists\ \delta > 0:\quad \forall\ \varepsilon > 0,\ \vert x-y\vert
 < \delta \implies \vert f(x) - f(y) \vert < \varepsilon.\quad (1) $$
Then $f$ is a constant function.

Proof:
Suppose $f:\mathbb{R}\to\mathbb{R}\ $ has property $\ (1),\ $ and $f$ is non-constant, that is, $\ \exists\ x_1 \neq x_2\ $ with
$\ f(x_1)\neq f(x_2).$
Let $\ \alpha = \left\lceil \frac{ \vert x_2 - x_1 \vert }{ \delta } \right \rceil + 1,\ $ so that $\ \beta: = \frac{ \vert x_2 - x_1\vert }{ \alpha } < \delta,\ $ and set $\ \varepsilon = \frac{ \vert f(x_2) - f(x_1) \vert }{ \alpha }.$
Since $\ \vert x_1 + k\beta - (x_1 + (k-1)\beta ) \vert = \beta < \delta\quad \forall\ k\in\{1,2,\ldots,\alpha\},$
$(1)\implies \vert f(x_1 + k\beta) - f(x_1 + (k-1)\beta) \vert < \varepsilon\quad \forall\ k\in\{1,2,\ldots,\alpha\}.\ $ It follows that:
$$ \vert f(x_2 - f(x_1) \vert = \left \lvert \sum_{k=1}^{k=\alpha} f(x_1 + k\beta) - f(x_1 + (k-1)\beta) \right \rvert$$ $$ \leq \sum_{k=1}^{k=\alpha} \left \lvert f(x_1 + k\beta) - f(x_1 + (k-1)\beta) \right \rvert $$
$$ < \alpha \varepsilon = \vert f(x_2) - f(x_1) \vert\ \Rightarrow \Leftarrow.$$
I would like to know: (a) if my proof is correct, as I felt confused when writing it, and (b) if there are any good alternative approaches, as my proof seems like overkill to me.
I am aware that, since $\ f\ $ has property $(1),\ f\ $ is uniformly continuous and therefore continuous also. Therefore the Intermediate Value Theorem applies to every interval $\ I\subset\mathbb{R}.\ $ However, I didn't mention these facts in my proof because I didn't use them. Maybe an alternative approach would make good use of them?
 A: Your solution is ok.
What is interesting here is that the condition:
$$\exists\delta>0:\ \forall\varepsilon>0:\ \vert x-y\vert<\delta\implies\vert f(x)-f(y)\vert<\varepsilon$$
implies that, for that chosen $\delta$, whenever $|x-y|<\delta$ it must be $|f(x)-f(y)|<\varepsilon$ for every $\varepsilon>0$. So, $|f(x)-f(y)|$ is smaller than any positive number $\varepsilon$, so it must be zero, i.e.:
$$\exists\delta>0:\ \vert x-y\vert<\delta\implies f(x)=f(y)$$
So, the function is constant on any interval of size $\delta$, and you can see that this easily implies that it is constant on the entire $\mathbb R$.

Update The "easily implies" bit above may still require a proof. Let $x<y$: subdivide the segment $[x,y]$ by points $x_0=x<x_1<x_2<\cdots<x_{n-1}<x_n=y$ such that all $x_{k+1}-x_k<\delta$. Then, the previous consideration implies that $f(x)=f(x_0)=f(x_1)=f(x_2)=\cdots=f(x_{n-1})=f(x_n)=f(y)$.
A: Here is a very basic proof. Let $x,y \in \mathbb R$ be such that $|x-y| < \delta$. Then forall $\epsilon > 0$ you have
$$
|f(x)-f(y)| < \epsilon
$$
which means $f(x)=f(y)$. It is then easy to check that $f$ is constant on any open interval of length $\delta$. Cover $\mathbb R$ with open intervals of length $\leq \delta$ that are overlapping, say $I_n = (n\delta/2 , (n/2+1)\delta),\quad n\in \mathbb Z$. Then you know that forall $n \in \mathbb Z$, $f$ is constant on $I_n$, and you are left to check that each of these constant are in fact equal. This can be done by induction, let me show that forall $n \in \mathbb N$, $f$ is constant to $f(\delta/2)$ on $I_n$.

*

*On $I_0 = (0 , \delta)$, $f$ is constant to $f(\delta/2)$.

*If on $I_n,\quad n \in \mathbb N$, $f$ is constant to $f(\delta/2)$ we have that on $I_{n+1}$ the function $f$ is constant. But now use the overlapping property: observe that the set
$$
I_n \cap I_{n+1} = (n\delta/2 , (n/2+1)\delta) \cap ((n+1)\delta/2 , ((n+1)/2+1)\delta) = ((n+1)\delta/2 , (n/2+1)\delta)
$$
contains one point, say $x_n = (n/2 + 3/4)\delta$, and discover
$$
f(x) = f(x_n) = f(\delta/2)
$$
forall $x \in I_{n+1}$.

The same proof works for $n \in \mathbb Z_-$.
