Using the definition of continuity and the $\epsilon$-$\delta$ definition of a limit, how would you proceed to show that the following statement holds true?
Let $f : \Bbb{R} \rightarrow \Bbb{R}$ be a continuos function at $x=0$, with the property that if $x\neq 0$ then $f(x)\geq 0$. Then $f(0) \geq 0$.
My attempt so far has been to assume that $f(0) \lt 0$, which means that $$f(0)=\lim_{x\to 0} f(x)\lt 0,$$ because of the continuity at the given point. Furthermore, I think this means that when $x$ approaches $0$ from both sides, at some point the value $f(x)\lt 0$, thus forming a contradiction.
I can't seem to see what to do afterwards. Is this a way of approaching the problem? And how will the $\epsilon-\delta$ definition come into play if my approach is usable?
Using the definition of continuity we have,
$$|x-0| < \delta \implies |f(x) - f(0)| < \epsilon \implies f(x) < f(0) + \epsilon$$ Now take $\epsilon = -f(0)/2$ to get a contradiction under the assumption that $f(0) < 0$.