Can someone please verify my proof and let me know if it is accurate? I am afraid that at least the proof for "$(\rightarrow)$" is inaccurate to a certain degree since I am not using the hypothesis that $\rho_E(x) = 0$. Also, I think the text in blue below is not entirely accurate, notation-wise.
Please don't bother suggesting a completely new approach to the proof (I found one here) unless you are suggesting a way to tweak the current proof; I'd be grateful if someone can just proofread my current proof.
(Baby Rudin Exercise 20 Chapter 4): If $E \subset X$ is nonempty, define the distance from $x \in X$ to $E$ by $$\rho_E(x) = \inf_{z \in E} d(x, z).$$ Prove that $\rho_E(x) = 0$ iff $x \in \bar E$.
My proof:
$(\rightarrow)$ Let $E \subset X$ be nonempty and $\rho_E(x)$ be defined as in the preamble. Suppose $\rho_E(x) = 0$ and $x \in X$. Since $X = E \cup E^c$, either $x \in E$ or $x \notin E$. If $x \in E \subset \bar E$, we are done; so, suppose $x \notin E$. Then, given any $\epsilon > 0$, $\exists z \in E$ such that $d(x, z) < \epsilon$. Since $\epsilon$ was arbitrary, every neighborhood of $x$ contains $z \in E$. Also, $x \notin E \implies z \ne x$. Thus, $x$ is a limit point of $E$. In any case, $x \in \bar E$.
$(\leftarrow)$ Suppose $x \in \bar E$ and $z \in E$. If $x \in E$, then $\rho_E(x) = \inf_{z \in E} d(x, z) \color{blue}{\le d(x, x)} = 0$. Clearly, $\inf_{z \in E} d(x, z) \ge 0 \textrm{ since } d(x, z) \geq 0$ which forces $\rho_E(x) = 0$. If $x$ is a limit point of $E$, then given any $\epsilon > 0, \exists w \in E$ such that $w \in \{y \in X: |x-y|< \epsilon\}$, that is, \begin{equation*} \rho_E(x) = \inf_{z \in E} d(x, z) \le d(w, z) < \epsilon \end{equation*} Since $\epsilon > 0$ was arbitrary, $\rho_E(x) = 0$.