Let $X$ be a compact $T_2$ topological space and let $x_0\in X$. Can we find a continuous function $f:X\to [0,1]$ such that $f(x_0)=1$ and $f(x) < 1$ for any $x_0\neq x$?
My try: Every Compact $T_2$ space is normal. Consider any closed set $A$ in $X$ with $x_0\notin A$, then we can construct continuous function $f:X\to[0,1]$ with the help of Uryshon Lemma such that $f(A)=\{0\}$ and $f(x_0)=1$. But how to define/ensure that the $f$ has the desired property.
For metric spaces, it is straightforward: define $f(x)=1-\frac{d(x,x_0)}{1+d(x,x_0)}$. But what is its generalization in topological spaces?
Any hint or answer will be appreciated.