I'll give a sketch of the proof. But it's inspired by 18.6 of Matsumura. So please accept Anna's answer.

By Bordmann-Sharp 10.2.9 (B-S) we know that $E:= E_R(k)$ is an $\hat{R}$-module. Let $F := E_\hat{R}(E)$. Thus there is an embedding $i: E \to F$ of $\hat{R}$-modules. Since $E$ is $R$-injective, $i$ splits over $R$, i.e. there is a $R$-linear map $j: F \to E$ with $j\circ i = id_E$.

Suppose, we have shown that $F$ is indecomposable (claim 1) and that $j$ is $\hat{R}$-linear (claim 2), i.e. $i$ splits over $\hat{R}$. Then $E$ is an $\hat{R}$-direct summand of $F$ and hence $E=F$ holds.

Claim 1: $F$ is indecomposable as $\hat{R}$-module.

Suppose $F = M \oplus N$. Consider $M$ as $R$-module. Hence $M \cap E$ is an $R$-submodule of $E$ and since $E$ is an essential extension of $k$, $M \cap k \neq 0$. Analogously $N \cap k \neq 0$ and since $k$ is a field, we find $M \cap k \cap N \neq 0$, in contradiction to $M \cap N = 0$.

Claim 2: $j$ is $\hat{R}$-linear

$k = \hat{R}/\hat{m}$ is an $\hat{R}$-module with $k \le E \le F$. Hence $E_\hat{R}(k) \le F$ (as $\hat{R}$-modules) and by injectivity, $E_\hat{R}(k)$ is a direct summand of $F$. But $F$ is indecomposable, so $F = E_\hat{R}(k)$. In particular, $F$ is Artinian and for each $x \in F$ there is $t > 0$ such that $\hat{m}^t x = 0$ (B-S). Let $r \in \hat{R}$. Since $\hat{R}$ is $m$-adically complete there is $r_0 \in R$ such that $r-r_0 \in \hat{m}^t$. Therefore $(r-r_0)x = 0$ and since $j$ is $R$-linear, we obtain $j(rx) = r_0\cdot j(x)$ and the latter is by definition just $r\cdot j(x)$ (B-S). Thus $j$ is $R$-linear.