If $f$ is uniformly continuous on the dense set $E \subset X$ then a continuous extension of $f$ exists on $X$. 
Let $E \subset X$ which is a dense subset of $X$.The function $f$ has its range in $\mathbb{R}$.We need to show that there exists a continuous extension from $E$ to $X$.

My attempt :
let $x \in X$ and we choose a cauchy sequence {$e_n$} $\to x$.Now, since $\{e_n\}$ is a convergent sequence so it is a cauchy sequence. As $f$ is a uniformly continuous function, then $\{f(e_n)\}$ is also a cauchy sequence and so it is convergent to a point,we define that to be $f(x)$[As $\mathbb{R}$ is a complete metric space].
Now, we choose another sequence $\{(e_n)'\} \to x$.We see that
$d(e_n,x)<\frac{\delta}{2}$ for all $n \ge K_1$ and $d((e_n)',x)) < \frac{\delta}{2}$ for all $n \ge K_2$
Then, we see that $d_y(f((e_n)'),f(e_n)) \le \frac{\epsilon }{2}$ when $d(e_n,(e_n)')\le \delta$ for all $n \ge max\{K_1,K_2\}$.Using this equation we can show that $f((e_n)') \to f(x)$.
To prove:$f$ is uniformly continuous. We choose $d(x_m,x_n) < \frac{\delta}{3}$.
Let $\{(e_n^m)\} \to x_m$ and $\{(e_n^k)\} \to x_k$.Now,  $\{f(e_n^m)\} \to f(x_m)$ and $\{f(e_n^k)\} \to f(x_k)$.So,
$d_y(f(e_n^k),f(x_k)) < \frac{\epsilon}{3}$ for all $n \ge K_1$ and
$d_y(f(e_n^m),f(x_m)) < \frac{\epsilon}{3}$ for all $n \ge K_2$.
Now by some manipulations we can find a $N$ such that when $n_1,n_2 \ge N$ we have $d((e_{n_1}^m), (e_{n_2}^k))  < \delta $ and by choosing such a delta we can have $d_y(f(e_{n_1}^k),f(e_{n_2}^m) )< \frac{\epsilon}{3}$ for all $n_1,n_2\ge N$.Also we see that,
$d_y(f(x_m),f(x_k)) \le d_y(f(e_n^k),f(x_k)) + d_y(f(e_n^m),f(x_m)) + d_y(f(e_n^k),f(e_n^m))< \epsilon$ for all $n \ge max\{K_1,K_2,N\}$
This has been an attempt. Can someone go through my proof?I am not sure about the part where I am proving uniform continuity.
 A: 
Your proof is mainly correct, although the notation might seem a bit confusing at times. I will try to write a cleaner version of what you did in the last paragraph, where you proved the uniform continuity of the extension of $f$, which is denoted exactly the same. Of course, I shall assume that $(X, d)$ is a complete metric space and by abuse of notation, I shall also denote the standard euclidian distance on $\mathbb{R}$ by $d.$
Let $\varepsilon > 0.$ Since $f$ is uniformly continuous on the dense set $E,$ there is $\delta_\varepsilon > 0$ such that $d(f(e_1), f(e_2)) < \frac{\varepsilon}{3}$ whenever $d(e_1, e_2) < \delta_\varepsilon$ and $e_1, e_2 \in E.$ Take now $x, y \in X$ such that $d(x, y) < \frac{\delta_\varepsilon}{3}.$ From the definition of the extension (thus implicitly the density of $E$), we infer that there are $e_x, e_y \in E$ such that $d(e_x, x) < \frac{\delta_\varepsilon}{3} > d(y, e_y)$ and $d(f(x), f(e_x)) < \frac{\varepsilon}{3} > d(f(e_y), f(y)).$ In particular, it follows from the triangle inequality that we also have that $d(e_x, e_y) < \delta_\varepsilon.$ Hence we have that $d(f(e_x), f(e_y)) < \frac{\varepsilon}{3}.$ Finally, applying once again the triangle inequality, we deduce that $d(f(x), f(y)) \leq d(f(x), f(e_x)) + d(f(e_x), f(e_y)) + d(f(e_y), f(y)) < \varepsilon.$ This proves the claim that the extension of $f$ is uniformly continuous.
A: I state the proposition and prove it.
Proposition: Let $(X,d)$ be a metric space. Let $E\subseteq X$ be
a dense subset. Suppose that $f:E\rightarrow\mathbb{R}$ is uniformly
continuous. Then $f$ has a unique uniformly continuous extension $\bar{f}:X\rightarrow\mathbb{R}.$
(Note that $(X,d)$ needs not be complete.)
Proof: Existence of extension: Let $x\in X.$ Since $E$ is dense,
we may choose a sequence $(x_{n})$ in $E$ such that $x_{n}\rightarrow x$.
We go to show that $\lim_{n}f(x_{n})$ exists. Let $\varepsilon>0$
be given. Since $f$ is uniformly continuous, there exists $\delta>0$
such that $|f(t)-f(t')|<\varepsilon$ whenever $t,t'\in E$ with $d(t,t')<\delta$.
Choose $N\in\mathbb{N}$ such that $d(x_{n},x)<\delta/2$ whenever
$n\geq N$. For any $m,n\geq N$, we have that $d(x_{m},x_{n})\leq d(x_{m},x)+d(x,x_{n})<\delta$.
Therefore, $|f(x_{m})-f(x_{n})|<\varepsilon$ whenever $m,n\geq N$.
This shows that $(f(x_{n}))_{n}$ is a Cauchy sequence in $\mathbb{R}$
and hence $\lim_{n}f(x_{n})$ exists by the completeness of $\mathbb{R}$.
Next, we go to show that the limit $\lim_{n}f(x_{n})$ is independent
of the choice of the sequence $(x_{n})$, i.e., if $(x_{n}')$ is
another sequence in $E$ such that $x_{n}'\rightarrow x$, then $\lim_{n}f(x_{n})=\lim_{n}f(x_{n}')$.
Let $\varepsilon>0$. Choose $\delta>0$ such that $|f(t)-f(t')|<\varepsilon$
whenever $t,t'\in E$ with $d(t,t')<\delta$. Choose $N$ such that
$d(x_{n},x)<\delta/2$ and $d(x_{n}',x)<\delta/2$ whenever $n\geq N$.
For $n\geq N$, we have $d(x_{n},x_{n}')\leq d(x_{n},x)+d(x,x_{n}')<\delta$.
Therefore $|f(x_{n})-f(x_{n}')|<\varepsilon$. Letting $n\rightarrow\infty$,
we obtain $|\lim_{n}f(x_{n})-\lim_{n}f(x_{n}')|\leq\varepsilon$.
Since $\varepsilon>0$ is arbitrary, we conclude that $\lim_{n}f(x_{n})=\lim_{n}f(x_{n}')$.
Define a function $\bar{f}:X\rightarrow\mathbb{R}$ by $\bar{f}(x)=\lim_{n}f(x_{n})$,
where $(x_{n})$ is an arbitrarily chosen sequence in $E$ such that
$x_{n}\rightarrow x$. From the above discussion, $\bar{f}$ is well-defined.
Observe that if $x\in E$, we may choose $(x_{n})$ such that $x_{n}=x$
for all $n$, then $\bar{f}(x)=\lim_{n}f(x_{n})=f(x)$. That is, $\bar{f}$
is an extension of $f$. Lastly, we go to show that $\bar{f}$ is uniformly
continuous. Let $\varepsilon>0$ be given. Choose $\delta>0$
such that $|f(t)-f(t')|<\varepsilon$ whenever $t,t'\in E$ with $d(t,t')<\delta$.
Let $x,y\in X$ such that $(x,y)<\delta/3$. By density of $E$, we choose
sequences $(x_{n})$ and $(y_{n})$ in $E$ such that $x_{n}\rightarrow x$
and $y_{n}\rightarrow y$. Choose $N$ such that $d(x_{n},x)<\delta/3$
and $d(y_{n},y)<\delta/3$ whenever $n\geq N$. For $n\geq N$, we
have that $d(x_{n},y_{n})\leq d(x_{n},x)+d(x,y)+d(y,y_{n})<\delta$.
Hence, $|f(x_{n})-f(y_{n})|<\varepsilon.$ Letting $n\rightarrow\infty$
yields $|\bar{f}(x)-\bar{f}(y)|\leq\varepsilon$. This shows that
$\bar{f}$ is uniformly continuous.
Uniqueness of extension: Suppose that $f_{1}$ and $f_{2}$ are continuous
extension of $f.$ Let $x\in X$. Choose a sequence $(x_{n})$ in
$E$ such that $x_{n}\rightarrow x$. We have that
\begin{eqnarray*}
f_{1}(x) & = & \lim_{n}f_{1}(x_{n})\\
 & = & \lim_{n}f(x_{n})\\
 & = & \lim_{n}f_{2}(x_{n})\\
 & = & f_{2}(x).
\end{eqnarray*}
Therefore $f_{1}=f_{2}$.
