Let $g(k):=\lim_{x\to k}f(x)$. Since you want $g$ to be differentiable everywhere, it has an antiderivative.
So by integrating both sides you get $g(k)=\lim_{x\to k}f(x)=c$ for some constant $c$.
But as has been shown already,$g$ being constant doesn't mean that $f$ is constant, as the limit irons away all isolated points. That is, if we define $M:= \{x\mid f(x) \neq c\}$, then if $M$ has no accumulation point, then every converging sequence $(x_n)_{n\in\mathbb N} \subseteq R$ can only contain a finite amount of elements of $M$, and therefore we have $\lim_{n\to\infty} f(x_n)=c$.
That said, even if $M$ has an accumulation point, it still can work out, e.g. if $$f(x) = \begin{cases}
x, &\text{if}& \frac 1x \in \mathbb N
\\
0, &\text{else}&
\end{cases}$$.
However, $M$ mustn't be uncountable: If it were, it had an accumulation point $x$.Therefore $M_L:= \{x\mid f(x) < c\}$ or $M_U:= \{x\mid f(x) > c\}$ has to be uncountable. Let wlog $M_L$ be uncountable. Rewrite it as
$$
M_L=\big( M_L\cap f^{-1}((-\infty,c-1) ) \big)\cup\bigcup_{n=0}^\infty \big(M_L\cap f^{-1}( [c-\frac 1{2^n},c-\frac 1{2^{n+1}}) )\big)
$$
Since the right hand side is a disjunct union of countably many elements, at least one of it has to be uncountable. Let thus for some $n$ the part $P:=\big(M_L\cap f^{-1}( [c-\frac 1{2^n},c-\frac 1{2^{n+1}}) )\big)$ be uncountable.
Then this part has an accumulation point, and therefore a converging sequence $(x_n)_{n\in\mathbb N} \subseteq P$. But $\lim_{n\to\infty} f(x_n) \le c-\frac 1{2^{n+1}}<c$.