I'm considering the following problem:
Let $f(x)=\limsup_{\varepsilon\to0}\{f(y)\mid |x-y|\le\varepsilon\}$ for a upper semicontinuous function $f:(0,1)\to\mathbb{R}$. Assume that a sequence $\{x_k\}$ is given so that $x_k\to x$ as $k\to\infty$. Then is there a constant $C>0$ such that $f(x)-\frac{C}{k}\le f(x_k)$?
The converse statement is obvious by the definition of supremum, that is, if one takes a constant $C>0$, then there exists a sequence $\{x_k\}$ such that $x_k\to x$ as $k\to\infty$ and $f(x)-\frac{C}{k}\le f(x_k)$. The above statement also looks clear but I can not tell for sure.
I'm glad if you give me some comments, solution or counter-examples if exists.
Edit
Thanks to Mr. John Ma, I understand that there is no constant such that $f(x)-\frac{C}{k}\le f(x_k)$ for each $k\in\mathbb{N}$. For this result, I have new problem:
Assume that the same conditions as the above problem. Then is there a function $g(k)$ (possibly positive) such that $g(k)\to0$ as $k\to\infty$ and $f(x)-g(k)\le f(x_k)$?
Background of my question and comfusing point
I want to know whether not, when a point $x$ is given, a upper semicontinuous function $f$ is continuous near $x$. Of course, I think it's not true although it contradicts my hope since a jump point is clearly not contnuous near there. However, I also wonder if there exists a function $g$ like the above. If exists, we have $$ f(x)-g(k)\le f(x_k)\le f(x)\Rightarrow \lim_{k\to\infty}f(x_k)=f(x). $$ This show that $f$ is continuous near $x$, but it is erroneous as I said. Where is a wrong? or Is there no function $g$?
The condition $$\tag{1} f(x) - \frac{C}{k} \le f(x_k)$$ is actually very strong as there is no conditions on the sequence $x_k \to x$. Indeed you can find a counterexample even for a function as simple as a linear function: Let $f(x) = x$ on $(0,1)$ and $x_k = \frac 12 - \frac{1}{\sqrt k}$. Then $x_k \to x=\frac 12$ and $(1)$ is the same as $$\frac 12 - \frac{C}{k} \le \frac 12 - \frac{1}{\sqrt k} \Leftrightarrow \sqrt k \le C$$ one cannot find a $C$ such that $\sqrt k \le C$ for all $k$.
If your function $f$ is merely upper semi-continuous and is not continuous at $x$, then there are sequences $\{x_k\} \to x$ so that such a $g(k)$ cannot be found. For example,
$$f(x) = \begin{cases} \sin\left(\frac 1x\right) & \text{if }x\neq 0, \\1 & \text{if }x=0.\end{cases}$$ is upper semicontinuous and not continuous at $x=0$. Pick $x_k = \frac{1}{\pi k}$. Then $x_k \to x$ and $f(x_k) = 0$. So if $$f(x) - g(k) \le f(x_k),$$ then $g(k) \ge 1$ for all $k$ and so $g(k)$ does not converge to $0$.