Let $X$ be a metrizable space. I'd like to prove that if $X$ is pseudocompact, then $X$ is compact (the converse is true by the Heine-Borel theorem).
Suppose $X$ was not compact. Since $X$ is metrizable, we have that $X$ is not sequentially compact. Hence, there exists a sequence $\{x_n\}_{n\in\mathbb{N}}$ in $X$ such that $\{x_n\}_{n\in\mathbb{N}}$ doesn't have any convergent subsequences in $X$. Let $S$ be the support of the sequence $\{x_n\}_{n\in\mathbb{N}}$ and let $g: S\to\mathbb{R}$ the function defined by $g(x_n):=n$. Now I'd like to prove that $S$ is discrete. Why? Because if I will prove that $S$ is discrete, I had that $S$ contains vacuously its accumulation points, then $S$ is closed. Now the function $g:S\to\mathbb{R}$ is continuous (since $S$ is discrete). Hence, I can apply the Tietze Extension Theorem that tells me that $g$ can be extended to a continuous function $G:X\to\mathbb{R}$. But this function is not bounded since the restriction $G_{|S}=g$ is not bounded: this one is a contradiction with the hypothesis of pseudocompactness of $X$.
Can anyone help me please?
PS: "$X$ is pseudocompact" stands for "each continuous function $F:X\to\mathbb{R}$ is bounded".