So the formal definition:
$(\forall \epsilon > 0)(\exists \delta > 0)(\forall x \in \mathbb{R})(0 < \mid x - x_0 \mid < \delta \implies \mid f(x) - L \mid < \epsilon)$
If this is true then we say $\lim_{x \to x_0} f(x) = L$. In my opinion, this really only makes sense if the function is defined for all values of $\mathbb{R} - \{x_0\}$. Say the function is not defined at a point different from $x_0$, call it $x_1$, then the expression $\mid f(x_1) - L \mid < \epsilon$ doesn't make sense and we can't really assign a truth value to it, and so we can't really know if a specific $\delta$ that includes $x_1$ is good or not.
I thought about it and came up with two possible solutions, but I have my doubts about both. First we could modify the definition of limit so that it only works for values where the function is defined, for instance if $A \subseteq \mathbb{R}$ and the function is defined as $f:A \to\mathbb{R}$, we could tweak the formal definition so that it says:
$(\forall \epsilon > 0)(\exists \delta > 0)(\forall x \in A)(0 < \mid x - x_0 \mid < \delta \implies \mid f(x) - L \mid < \epsilon)$
This solution has a problem and the problem is that if a function is only defined at one point, call it $x_0$, then the limit as $x$ approaches $x_0$ would exist because the implication would always be vacuously true, but we don't want the limit to exist in such cases.
The second solution, which I think is the more natural one, is to define $\mid f(x) - L \mid < \epsilon$ as false when $f(x)$ is not defined for that specific value of $x$. This solution has the side effect that in order for the limit to be defined at a point $x_0$, the function would have to be defined on an open interval that contains $x_0$, with the possible exception of $x_0$ itself. The problem with that is that I was arguing with someone about it and they told me the limit should exist even when the function is not defined on one side of $x_0$, as long as it is defined on the other side.
So what is it then? How do you deal with functions that are not defined in points other than $x_0$?
For us to talk about the limit of $f$ at $x_0$, we require $x_0$ to be an accumulation point of the domain of $f$, that is, that for every $c>0$ there is some $x\in \operatorname{Dom}(f)$, with $x\neq x_0$, in $(x_0-c,x_0+c)$.
This is equivalent to saying that there exists a sequence in the domain of $f$ that converges to $x_0$ but is never actually equal to $x_0$.
In other case, $x_0$ is called an isolated point (of the domain) and it does not make sense to talk about the limit of $f$ at $x_0$.