In proving every subspace of a separable metric space is separable, I need below result. Could you check if my proof is fine?
Theorem: Let $(E,d)$ be a metric space. Then $X$ is second-countable if and only if $X$ is Lindelöf if and only if $X$ is separable.
Proof: Let $X$ be second-countable, i.e., $X$ has a countable base $(O_i)_{i \in \mathbb N}$. Let $(C_j)_{j \in J}$ be an open cover of $X$. Then for each $j \in J$, there is $I_j \subseteq \mathbb N$ such that $C_j = \bigcup_{i \in I_j} O_i$. Let $I := \bigcup_{j \in J} I_j \subseteq \mathbb N$. For each $i \in I$, let $\varphi(i)$ be one of those $j$ such that $i \in I_j$. Then $(C_{\varphi(i)})_{i \in I}$ is a countable subcover of $(C_j)_{j \in J}$.
Let $X$ be Lindelöf. For each $n \in \mathbb N^+$, the collection of open balls $\mathcal U_n :=\{\mathbb B(x, 1/n) \mid x \in X\}$ is an open cover of $X$. Then for each $n \in \mathbb N^+$, there exists a countable subcover $\mathcal U_n' \subseteq \mathcal U_n$. Clearly, $\mathcal U := \bigcup_n \mathcal U'_n$ is a countable union of countable sets and thus countable. It's easy to verify that $\mathcal U$ is a dense countable subset of $X$.
Let $X$ be separable, i.e., $X$ has a countable dense subset $E \subseteq X$. For each $x \in X$ there is a sequence $(e_{x,n}, 1/n)_n$ in $E \times \mathbb N^*$ such that $x \in \mathbb B(e_{x, n}, 1/n)$. Let $\mathcal U$ be the collection of all balls of the form $\mathbb B(e_{x, n}, 1/n)$ where $x \in E$ and $n \in \mathbb N$. Clearly, $\mathcal U$ is countable. Let $O \subseteq X$ be open. For each $x \in O$, there is $r_x >0$ such that $\mathbb B(x, r_x) \subseteq O$. Let $n_x$ be the least $n$ such that $1/n < r_x / 2$. It follows that $x \in \mathbb B(e_{x, n_x}, 1/n_x) \subseteq O$. Hence $O = \bigcup_{x \in O} \mathbb B(e_{x, n_x}, 1/n_x)$. Hence $\mathcal U$ is a countable base of $X$.