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.