I am currently studying Potential Theory of the Complex Plane written by Ransford. In his early section of his second chapter, he introduces the notion of upper semi continuous functions (u.s.c) and he proves a theorem of approximating such functions by continuous ones, Theorem 2.1.3, having the assumption that the u.s.c function $u$ should be bounded above.
Next, he presents an exercise which states that this condition can be removed by using a distinct test function, defined as follows.
Let $(X,d)$ be a metric space and $u\colon X\rightarrow [-\infty,+\infty)$ be an u.s.c. For $n\geq 0$, define the $$F_n\doteqdot \{x\in X\colon u(x)\geq n\}$$ $$\psi_n(x)\doteqdot \max(0,1-n dist(x,F_n))\qquad (x\in X)$$
Then one can show that the sum $\sum_{n=0}\psi_n$ converges locaaly uniformly to a continous function $\psi$ with $\psi\geq u$.
Now, the problem is first I cannot even vizualize how this series to such function. I thought of concrete examples of upper semi continuous functions, like $$u(x)=x \text{ for }0\leq x<1\qquad u(x)=2 \text{ for }1\leq x<+\infty$$ Then, computing easily the $F_n$ and $\psi_n$, the result is validated. I cannot think of a general way to approach its proof however. Any help shall be appreciated.