Solution (source code)

= Solution

The <Bolzano-Weierstrass theorem> in $\mathbb R$ says that every bounded real sequence has a convergent subsequence. For a bounded sequence in $\mathbb R^n$, successively extract subsequences on which the first, second, and so on through the $n$th coordinate converge. The final diagonal subsequence converges in <Euclidean space>, proving the theorem in $\mathbb R^n$.

Put $K=D\setminus\bigcup_{z\in S}B_\varepsilon(z)$. Suppose the asserted $\delta$ did not exist. Then there would be $x_k\in D$ and $y_k\in K$ with $\|x_k-y_k\|<1/k$ but $|f(x_k)-f(y_k)|\geq\varepsilon$. Since $K$ is closed and bounded, Bolzano-Weierstrass gives a subsequence $y_k\to y\in K$, and then $x_k\to y$. The point $y$ is not in $S$, because otherwise $y\in B_\varepsilon(y)$, so $f$ has <continuity> at $y$. Both $f(x_k)$ and $f(y_k)$ tend to $f(y)$, a contradiction. Hence the required \b[uniform $\delta>0$ exists].