Existence of limit of a function with the help of information about its partial derivatives We know the following result:

Theorem: If $f$ is defined on $S = \left\lbrace x \in \mathbb{R}^n | a_i < x_i < b_i, \text{for all } i = 1, 2, \cdots, n \right\rbrace$ and is such that all its first order partial derivatives are bounded on $S$, then $f$ is continuous on $S$.

I was wondering if we can say the same thing if $f$ is defined on a punctured set? Particularly, is the following statement true:

If $f$ is defined on $\mathbb{R}^n \setminus \left\lbrace 0 \right\rbrace$ and is such that all its first partial derivatives are bounded (near zero), then we can define $f \left( 0 \right)$ such that $f$ is continuous on $\mathbb{R}^n$.

Clearly, it is not true for $n = 1$. Since we can have the following function
$$f \left( x \right) = \begin{cases} 1, & x > 0 \\ - 1, & x < 0 \end{cases}$$
which is continuous on $\mathbb{R} \setminus \left\lbrace 0 \right\rbrace$ and all its first (partial) derivative at every point is zero but $f \left( 0 \right)$ cannot be defined to make it continuous.
My question is whether the statement is also false for $n > 1$? Any insights into this will be appreciable! Thanks in advance!
 A: I think your claim is true!
Assume $|\partial_if(x)|<M$ for $x$ near $0$. Consider two points $x$ and $y$ with norm less than $r$ for some $r>0$. Connect $x$ and $y$ with an orthogonal path.
If there is a shortest orthogonal path that doesn't pass through the origin, we get
$$
|f(x)-f(y)| < 2nrM,
$$
since the path has length less than $2nr$. (I suspect this is the proof of your original theorem).
If on the other hand $x$ and $y$ lie on the same coordinate axis on either side of the origin, we'll have to make a longer path that avoids going though the origin. So go a small distance $\delta>0$ orthogonally, then go past the origin to other point, and connect with a backstep of $\delta$ again. E.g. say $x=(-1,0)$, $y=(2,0)$; then we go $(-1,0)\to(-1,\delta)\to(2,\delta)\to(2,0)$. The length is bounded by $2r+2\delta$, so
$$
|f(x)-f(y)| < (2r+2\delta)M,
$$
and letting $\delta\to0$ gives $|f(x)-f(y)| \le 2rM$. In all cases we conclude
$$ \tag{$*$}
|f(x)-f(y)| \le 2nrM,
$$
from which it is evident that $\lim_{x\to0}f(x)$ exists. (Not quite so evident – see below).

That took care of continuity at $0$. Other points of course follow from the same (but simpler) argument, or from your theorem.

Proof of limit: Let $x_1, x_2, \ldots$ be a sequence converging to $0$ (in which $x_m\ne0$ for all $m$). From $(*)$ we see that $f(x_1), f(x_2), \ldots$ is a Cauchy sequence, so it converges to a limit $L$.
Let $\varepsilon>0$ be given. Pick an $m_0$ such that both $|f(x_{m_0})-L|<\varepsilon$ and $\|x_{m_0}\|<\varepsilon$. Let $r=2\|x_{m_0}\|$. Then, for all $x$ with $\|x\|<r$, we have by $(*)$ that
$$
|f(x)-L| 
\le |f(x)-f(x_{m_0})|+|f(x_{m_0})-L| 
< 2nrM + \varepsilon
< (4nM+1)\varepsilon.
$$

Note by the way that $(*)$ is easily strengthened to
$$
|f(x)-f(y)| \le M \|x-y\|_1
$$
by the same argument as above. That means $f$ is in fact Lipschitz continuous (even in $x=0$ as can be seen with a little bit of extra work).
