I am trying to show, using the epsilon-delta definition of the limit, that the function $$f(x) = \begin{cases}1 & \text{if $x = 0$}\\x & \text{if $x \neq 0$}\end{cases}$$ is discontinuous at $x = 0$.
We want to show that $$\exists \varepsilon > 0\;\forall \delta > 0\;\exists x\;(|x| < \delta \wedge |x-1| \geq \varepsilon).$$ I started by trying to choose a suitable $x$ in terms of $\delta$, but $|x-1| \geq \varepsilon > 0$ implies that $x \neq 1$. I am finding it hard to find an expression in terms of $\delta$ that never equals 1.
For any $x\in(0,1/2]$ (you forgot the condition $x\ne0$ in what "we want to show"), $$|x-1|=1-x\ge1/2$$ hence we may choose $\varepsilon=1/2$ and then, for any $\delta>0$, pick any $x\in(0,\min(1/2,\delta))$.