Hint: For convenience, define $x_{\infty} := x$. Then you have a 'rank' map $r : S \to \mathbb{N} \cup \{\infty \} : x_k \mapsto k$. Now, let $y : \mathbb{N} \to S : k \mapsto y_k$ be a sequence. You can consider the compose map $r \circ y : \mathbb{N} \to \mathbb{N} \cup \{\infty\}$, which allows you somewhat to count how many times the sequence 'passes by' any point of $S$.
Here are two (non mutually exclusive) possibilities (you have to prove this): Either the map $r \circ y$ is constant on a subset $X \subset \mathbb{N}$ of infinite cardinality or it is strictly increasing on a subset $Y \subset \mathbb{N}$ (of infinite cardinality). To prove this, it might be useful to prove that you can always find a subset $Z \subset \mathbb{N}$ of infinite cardinality on which the function $y$ is a (not necessarily strictly) increasing function; This observation underlies the second part of timon's comment to your question$^1$. In the first case, the subsequence $ \left. y \right|_X$ is constant (and thus converges); In the second case, one has to show that the subsequence $\left. y \right|_Y$ converges to $x_{\infty}$ (which relies on the first part of timon's comment).
$^1$ To be a bit picky about timon's comment, I point out for instance that the sequence $(y_k = x_{\infty})_k$ is a sequence in $S$, but not a subsequence of the sequence $(x_n)_n$. The composition $x \circ r \circ y$ formalises in what sense $y$ could be (generally abusively) understood as a subsequence of $x$.