Given $$f(x) = \begin{cases} 0, & x \in [-2,2]\\ x-2, & x > 2\\ x+2, & x < -2, \end{cases} $$ check whether $f$ is continous on $\mathbb{R}$.
I used one-side limits in order to check the continuity at $x=-2$ and $x=2$, as there is no need to check the continuity at other points. Therefore, $\lim_{x\to 2^-}f(x) = 0$ and $$\lim_{x\to 2^+}f(x) = \lim_{x\to 2^+} (x - 2) = 2 - 2 =0.$$ Limits exist, they are defined and equal to each other, hence $f$ is continuous on $\mathbb{R}$.



Examining a 'toned down' scenario can be used to put together a complete logical argument to address the OP's question.
Let $\alpha \lt 0 \lt \beta$ and $a, b \in \mathbb R$.
Consider a function $f: (\alpha, \beta) \to \mathbb R$ defined by
$$f(x) = \begin{cases} ax, & x \in (\alpha,0)\\ 0, & x = 0\\ bx, & x \in (0,\beta) \end{cases} $$
Then $f$ is continuous at $x = 0$.
If both $a$ and $b$ are zero then is $f$ is a constant function and therefore continuous at $x =0$.
Otherwise let $\varepsilon \gt 0$. Construct
$$\tag 1 \delta = min(-\alpha, \beta, \frac{\varepsilon}{max(|a|, |b|)})$$
Then if $|x - 0| \lt \delta$ we know that that $x$ is in the domain of $f$ and also that
$$\tag 2 |x| \lt \frac{\varepsilon}{max(|a|.|b|)}$$
But then
$$\tag 3 |f(x) - f(0)| = |f(x)| < |x| \; max(|a|,|b|) \lt \varepsilon$$