Proof that a set has the Lindelöf property in a metric space I am having some problems with the proof of the following Theorem: 
"Let $E$ be a set in a metric space $\mathscr{X}$. Then $E$ has the Lindelöf property provided there exists a countable set $D$ which is dense in $E$ ". 
A set $E\in\mathscr{X}$ has the Lindelöf property if every open cover has a countable subcollection that covers $E$. The proof I am using can be found on page 80 of the book "Topological Ideas" by K.G. Binmore. I have a real problem only with one part of the proof, but I show the whole proof as given in the text for completeness (I have made some notational changes). For a proof for $\mathscr{X}=\mathbb{R}^{n}$ see How to prove that if $D$ is countable, then $f(D)$ is either finite or countable?.
Let $\mathscr{U}$ be any collection of open sets that covers $E$. We need to show that a countable subcollection of $\mathscr{U}$ covers $E$. Let $\mathscr{B}$ be the class of open balls $B_{q}(d)$ with centers $d\in D$, and rational radii $q$ such that $B_{q}(d)\subset U$ for at least one $U\in\mathscr{U}$ (I will use $B\in\mathscr{B}$ for a general element). Then $\mathscr{B}$ is countable (I have omitted some stuff which shows this). The following statement is then proven (this is the bit I am having a problem with):
$E\subset\bigcup_{U\in\mathscr{U}}U\subset\bigcup_{B\in\mathscr{B}}B\hspace{200pt}(1)$.
The above is proven in the following way: Let $u\in U$ for any $U\in\mathscr{U}$. Since $U$ is open, it is contained in an open ball $B_{\epsilon}(u)$ such that $B_{\epsilon}(u)\subset U$. Since $E$ is dense in $D$ we have $d(e,D)=0$ for each $e\in E$, and so we can always find a point $d\in D$ such that $d(u,d)<\frac{1}{3}\epsilon$ (my problem is here: I think this only holds if $u\in E$ correct?). We can also choose a rational number $q$ such that $\frac{1}{3}\epsilon<q<\frac{2}{3}\epsilon$ (a Theorem is referenced for this result). Then because $d(u,d)<\frac{1}{3}\epsilon<q$, we have $u\in B_{q}(d)\in\mathscr{B}$. Now let $y\in B_{q}(d)$. We have $d(u,y)\leq d(u,d)+d(d,y)<\frac{1}{3}\epsilon+q<\epsilon$. Thus $y\in B_{\epsilon}(u)$, and so $u\in B_{q}(d)\subset B_{\epsilon}(u)\subset U$. Thus every $U\in\mathscr{U}$ must be a union of all the $B_{q}(d)\subset B_{\epsilon}(u)$ that contain each $u\in U$. These open balls are a subset of $\mathscr{B}$, which proves (1)
So my question is, for the point $u\in U$ in the above paragraph, how can we always find a point $d\in D$ such that $d(u,d)<\frac{1}{3}\epsilon$ if $u\not\in E$? From the hypotheses of the Theorem I do not see why every $u\in U$ has to be in $E$. I now finish the proof as it is given in the book.
Proof continued: Let $f:\mathscr{B}\rightarrow\mathscr{U}$ be chosen so that $B\subset f(B)$ for each $B\in\mathscr{B}$, then $f(\mathscr{B})$ is a countable subcollection of $\mathscr{U}$ (see How to prove that if $D$ is countable, then $f(D)$ is either finite or countable? for a proof of this one). Thus
$E\subset\bigcup_{B\in\mathscr{B}}B\subset\bigcup_{B\in\mathscr{B}}f(B)\subset\bigcup_{U\in f(\mathscr{B})}U\subset\mathscr{U}$.
This shows that $f(\mathscr{B})$ is a countable subcollection of $\mathscr{U}$.
I have one question regarding the above paragraph: Can we always choose the function $f$ so that $B\subset f(B)$ for each $B\in\mathscr{B}$? I suppose $f(b)=b$ for all $b\in B$ does the trick? Any help on these questions would be greatly appreciated.
 A: You have in fact found a hole in the proof as given, though it’s easily patched. One fix is the one suggested by Quinn Culver in the comments: throw away $\mathscr{X}\setminus E$ and take $E$ to be the metric space in which you’re working (the ambient space), replacing every open set in $\mathscr{X}$ with its intersection with $E$.
A fix that stays closer to the author’s apparent intent goes as follows:

Let $u\in E$. Then $u\in U$ for some $U\in\mathscr{U}$. Since $U$ is open, there is some $\epsilon>0$ such that $u\in B_\epsilon(u)\subseteq U$. Since $E$ is dense in $D$, there is a point $d\in D\cap B_{\epsilon/3}(u)$. We can also choose a rational number $q$ such that $\frac{\epsilon}3<q<\frac{2\epsilon}3$. Then because $d(u,d)<\frac{\epsilon}3<q$, we have $u\in B_{q}(d)\in\mathscr{B}$. Now let $y\in B_{q}(d)$. We have $d(u,y)\leq d(u,d)+d(d,y)<\frac{1}{3}\epsilon+q<\epsilon$. Thus $y\in B_{\epsilon}(u)$, and so $u\in B_{q}(d)\subset B_{\epsilon}(u)\subset U$. Thus, for each $U\in\mathscr{U}$, $$E\cap U=\bigcup\{B\in\mathscr{B}:B\subseteq U\}\subseteq U\;.$$ If $\mathscr{B}_0=\{B\in\mathscr{B}:B\subseteq U\text{ for some }U\in\mathscr{U}\}$, this shows that $E\subseteq\bigcup\mathscr{B}_0$. Now for each $B\in\mathscr{B}_0$ choose $U_B\in\mathscr{U}$ such that $B\subseteq U_B$; by the definition of $\mathscr{B}_0$ such a $U_B$ must exist. $\mathscr{B}_0$ is a subset of the countable collection $\mathscr{B}$, so $\mathscr{B}_0$ is countable, and therefore $\mathscr{U}_0=\{U_B:B\in\mathscr{B}_0\}$ is countable. But $E\subseteq\bigcup\mathscr{B}_0\subseteq\bigcup\mathscr{U}_0$, so $\mathscr{U}_0$ is a countable subset of $\mathscr{U}$ that covers $E$.

Notice that in this version I’m not claiming that you can find points of $D$ arbitrarily close to every point of $U$, but only to those that are in $E$. You were right to worry about it, because in fact you can’t guarantee that an arbitrary point of $U$ is in the closure of $D$. As an example, take $\mathscr{X}$ to be $\Bbb R^2$ with the usual topology, and let $E=\{\langle x,0\rangle:0<x<1\}$, the open unit interval on the $x$-axis. The points of $E$ with rational first coordinate are a countable dense subset. However, if $U$ is any open set in $\Bbb R^2$, $U\setminus E\ne\varnothing$, and for each $p\in U\setminus E$ there is an $\epsilon>0$ such that $B_\epsilon(p)\cap D=\varnothing$.
From your final question I suspect that you may have misunderstood the nature of the function $f$, which is one reason I’ve used a different notation above. The domain of $f$ is my $\mathscr{B}_0$, not some set of points of $\mathscr{X}$: the elements of the domain are the sets $B_q(d)$, not the points in those sets. For each $B\in\mathscr{B}$ that’s a subset of some member of $U$, $f$ picks a member of $U$ containing $B$. I tried to make that a little more clear by using $U$ as the name of the function instead of $f$ and writing the argument as a subscript: his $f(B)$ is my $U_B$, which I think is more obviously a single member of $\mathscr{U}$.
