Intermediate value property under some conditions imply continuity Let $f\colon \mathbb{R} \to \mathbb{R}$ be a function with the intermediate value property. 
Let $x \in \mathbb{R}$. Suppose to each sequence $ (x_n) $ converging to $x$ there exists a constant $M$ such that
$$|f(x) - f(x_n)| ≤M \sup _{m}|f(x_n) - f(x_m)|$$
Then show that $f$ is continuous at $x$.
Suppose that $f$ is not continuous at $x$. Then there exists $\epsilon>0$ such that given $\delta>0$ there exists $y$ such that $|x-y|<\delta$ with $|f(x)-f(y)|\geq \epsilon$.
In particular, given $n$, there exists $x_n$ such that $|x_n-x|<\frac{1}{n}$ with $|f(x_n)-f(x)|\geq \epsilon$.
So, we have the convergence $(x_n)\rightarrow x$. So, i can use the property that $$|f(x) - f(x_n)| \leq M \sup _{m}|f(x_n) - f(x_m)|$$
So, we have $$\epsilon\leq |f(x) - f(x_n)| ≤M \sup _{m}|f(x_n) - f(x_m)|$$
In particular,  $$\epsilon/M\leq  \sup _{m}|f(x_n) - f(x_m)|$$
I am stuck at this point.. I have no idea how to make use of intermediate value property of $f$..
Please give some hints.

Suppose, $f(x)=\left\{\begin{matrix} \sin \frac{1}{x} & x\ne 0 \\ 0 & x=0 \end{matrix}\right.$
This function is known for breaking thinks.
$f(x)$ is not continuous at $0$.  Yet does this function not satisfy all of the criteria?
