Extension of a function from almost everywhere to everywhere The informal general question is: let $f$ be a "sufficiently nice" function, defined "almost everywhere". Can we develop a method to uniquely extend $f$ to the "remaining" points?
Example: Let $f(x)=\text{sgn}(x)$ for $x \neq 0$. How to "correctly" define $f(0)$?
Here is the proposed solution in finite dimension. Let $f:{\mathbb R}^n \to {\mathbb R}$ be a locally integrable function. Then by Lebesgue differentiation theorem, for almost every $x$,
\begin{equation}
f(x)=\lim\limits_{\epsilon\to 0+} \frac{1}{|B_\epsilon(x)|}\int_{B_\epsilon(x)}f \,d\lambda, \quad \forall x \in {\mathbb R}^n,
\end{equation} 
where $B_\epsilon(x)$ is the ball with centre $x$ and radius $\epsilon$ and $\lambda$ is the Lebesgue measure. This equation can be used to define $f$ "consistently" on the set of measure $0$. In particular, it implies that $\text{sgn}(0)=0$.
My first question is: is this well-known? Is there, for example, a well-established name for functions satisfying the Lebesgue differentiation theorem everywhere?
My second, and more important, question is how to solve a similar problem in infinite dimensions? Let $f:B\to{\mathbb R}$ be (for example) continuous function defined almost everywhere on Hilbert space $B=L^2[0,1]$, or, more generally, on Banach space $B$ (see https://arxiv.org/abs/math/9210220 for definition of "almost everywhere" in infinite dimensions). How to define f "consistently" for the remaining points? In particular, can the above approach be extended, despite the non-existence of the Lebesgue measure in infinite dimensions?

Edit: Thank you for comments and answer, indicating that my question is not-trivial even in finite dimensions, because the proposed solution (a) does not work for all locally infegrable functions, but only for those for which the limit exists an every point, and (b) is sensitive to the choice of norm. However, the class of functions for which it works is still sufficiently large, and the choice of ${\cal L}^2$ norm is more-or-less standard in $R^n$. If you can suggest a solution working for a wider class of functions, and stable with respect to the choice of norm, please suggest. More importantly, any reasonable suggestions which work in infinite dimensions (even norm-sensitive ones) are more than welcomed.
 A: You seem to be assuming that the RHS of Lebesgue differentiation theorem converges for every $x$. 
Let $f:\mathbb{R}\to \mathbb{R}$ be the following function. 
First divide $\mathbb{R}$ into dyadic intervals. More precisely, Let $D_n = [-2^{n+1}, -2^n)\cup (2^{n}, 2^{n+1}]$. We have that $\mathbb{R} = \cup_{n\in \mathbb{Z}} D_n \cup \{0\}$. Define $f(x)$ on $\mathbb{R}\setminus \{0\}$ by 
$$ f(x) = (-1)^n, \quad x\in D_n $$
We have that
$$ \int_{-2}^2 f(x) ~\mathrm{d}x- \int_{-1}^1 f(x)~\mathrm{d}x = -2 $$
by explicit integration, but by scaling we have
$$ \int_{-2}^2 f(x)~\mathrm{d}x = -2 \int_{-1}^1 f(x) ~\mathrm{d}x $$
so 
$$ \frac{1}{|[-1,1]|}\int_{-1}^1 f(x) ~\mathrm{d}x= \frac{1}3. $$
Similarly however, 
$$ \frac{1}{|[-1/2,1/2]|} \int_{-1/2}^{1/2} f(x) ~\mathrm{d}x = - \frac{1}3 $$
... and so you see the limit
$$\lim_{\epsilon \to 0} \frac{1}{|B_{\epsilon}(0)|} \int_{B_{\epsilon}(0)} f(x) ~\mathrm{d}x $$
does not exist. 
Note that $f$ here is not only locally integrable in the Lebesgue sense, it is even Riemann integrable since it only has a countable number of discontinuities. 

Furthermore, why balls? Lebesgue differentiation theorem holds for all bounded eccentricity families. If you replace $B_\epsilon(x)$ by the family $C_\epsilon(x) = (x - \epsilon, x+2\epsilon)$ on $\mathbb{R}$, and use it to define $f(0)$ for the signum function, you will find $f(0) = 1/3$. In higher dimensions it is also common to use cubes instead of balls. But cubes oriented in different direction can also give rise to different limits on those measure-zero sets. 
