# How to prove converging subsequence lead to the existence of limsup for a function?

Let $f(x)$ be a function $X\rightarrow R$ and $x_0$ be a limit point in $X$, we define a ball without the center as $B_\delta'(x_0)=B_\delta(x_0) \backslash {x_0}$. The $\limsup$ of the function $f(x)$ at $x=x_0$ is defined as $\mathop {\lim \sup}\limits_{x \to {x_0},x \in X} f\left( x \right) = \mathop {{\rm{inf}}}\limits_{\delta > 0} [\mathop {\sup}\limits_{B_\delta'\left( {{x_0}} \right)\bigcap X}] =\mathop {\lim }\limits_{\delta \to 0} \mathop {\sup }\limits_{B_\delta '\left( {{x_0}} \right)\bigcap X} f\left( x \right)$.

I have proved that if $\mathop {\lim \sup}\limits_{x \to {x_0},x \in X} f\left( x \right) = M$ exists at $x=x_0$, then there exists a sequence ${x_k} \in X,\;\;{x_k} \to {x_0}$ such that $\mathop {\lim }\limits_{k \to \infty } f\left( {{x_k}} \right) = M$. The proof is as following,

However, I could not prove the converse. That is, if there exists a sequence ${x_k} \in X,\;\;{x_k} \to {x_0}$ such that $\mathop {\lim }\limits_{k \to \infty } f\left( {{x_k}} \right) = M$, then the $\limsup$ exists and is also $M$.

Anyone can help prove the converse? Thank you!

Say $(x_n)$ is a sequence in $R$. Note that when I talk about the limit of a subsequence I'm allowing $\infty$ and $-\infty$ as limits. Let $L$ be the set of all limits of convergent subsequences. Then $\limsup x_n$ is exactly the largest element of $L$.