Theorem The range $\mathcal{R}(T)$ of a compact linear operator $T\colon X \to Y$ is separable; here, $X$ and $Y$ are normed space.
Proof. Consider the ball $B_n=B(0,n)\subset X$. Since $T$ is compact, the image $C_n= T(B_n)$ is relatively compact. $C_n$ is separable by a precedent result. The norm of any $x\in X$ is finite, so that $\lVert x \rVert < n$, hence $x\in B_n$ with $n$ sufficiently large. Consequently, $$X = \bigcup_{n=1}^\infty B_n \implies T(X)=\bigcup_{n=1}^\infty T(B_n)=\bigcup_{n=1}^\infty C_n.$$
Since $C_n$ is separable, it has a countable dense subset $D_n$ and the union $$D=\bigcup_{n=1}^\infty D_n\subseteq T(X)$$ is countable. I can't see the point that $D$ is dense in $T(X)$, that is $cl(D)=T(X)$.
We have that $$cl(D)=cl\left(\bigcup_{n=1}^\infty D_n\right)\supseteq \bigcup_{n=1}^\infty cl(D_n)=\bigcup_{n=1}^\infty C_n = T(X).$$
And for the other inclusion? Is this correct? Or can the fact that $D$ is dense in $T(X)$ be observed differently?