If $E$ is a connected space, then so is $\overline{E}$. I have to prove that if $E$ is a connected space, then so is $\overline{E}$ (the closure of $E$) a connected space. I tried to prove the contrapositive. So suppose that $\overline{E}$ is not connected in a metric space $X$. This implies there are $A\subset X$ and $B\subset X$ such that $A\cap B=\emptyset$, $A\cap \overline{E}\neq \emptyset$, $B\cap \overline{E}\neq \emptyset$ and $\overline{E}\subset A\cup B$. I will try to prove that this $A$ and $B$ will also work for $E$. Suppose that $A\cap E=\emptyset$ and $B\cap E=\emptyset$, this implies that $A\cup B$ is a subset of the limit points of $E$, because $A\cap \overline{E}\neq \emptyset$ and $B\cap \overline{E}\neq \emptyset$. This contradicts the fact that $\overline{E}\subset A\cup B$, so we have to conclude that $A\cap E\neq \emptyset\neq B\cap E$. Since $E\subset\overline{E}\subset A\cup B$, we have that $E$ is also not connected.
My question is whether my proof is correct, because I have a little bit doubt. If it's not correct, what is the best I can do? Thanks in advance! 
Edit1: The definition we use for a connected space $E$ in a metric space $X$ is that if $E$ is connected, then there are no open $A,B\subset X$ such that $A\cap B=\emptyset$, $A\cap E\neq \emptyset\neq B\cap E$ and $E\subset A\cup B$.
Edit2: $A$ and $B$ must be open.
 A: A subset $E⊆X$ is connected iff the only continuous functions $f:E→\{0,1\}$ are the constant ones. A continuous function $g:X→Y$ where $Y$ is Hausdorff is uniquely determined by a dense subset of $X$, and $\{0,1\}$ with the discrete metric is evidently Hausdorff. $E$ is dense in $\overline E$ and continuous functions $f:E→\{0,1\}$ are constant by assumption. 
Another proof my proceed by contraposition. Suppose that $\overline E$ is disconencted by $U,V$. Then $E$ being dense has nonempty intersection with both $U,V$, so it is disconnected by $U'=E\cap U\;,\; V'=V\cap E$, for $U',V'$ are disjoint nonempty and relatively open in $E$, and $E=V'\cup U'$ by $\bar E=V\cup U$.
A: As other people have already noted, you need to add $A$ and $B$ are open to your definition. Moving into the second part of your proof, the assumption for contradiction is
$A \cap E = \emptyset$ or $B \cap E = \emptyset$.
You can assume, without loss of generality, that the first condition holds, i.e. $A \cap E = \emptyset$.
Now, your conclusion about limit points is true - $A \cap \overline E$ must consist only of limit points of $E$, i.e. $A$ is an open set that contains limit points of $E$, but no points of $E$ itself. Why can't this happen?
A: A bit more general statement which i think worth saying at this time is :
If $A$ is  everywhere dense connected subset of $X$ then $X$ is connected.
Suppose not, then, you have $X=U\cup V$ be a separation for $X$ by open sets (non empty, disjoint).
Then, $A=(U\cap A)\cup(V\cap A)$ would then be separation for $A$
But, $A$ is connected.... So, either $U\cap A$ or $V\cap A$ is empty...
Without loss of generality, we assume $U\cap A$ is empty.
But, as $A$ is every where dense, $A$ has non empty intersection with every non empty open set.
Thus, $U$ should be empty and so, $X$ is connected.
Now,we see for what you have asked... 
$A$ is dense in $\bar{A}$ and $A$ is connected, thus by previous result  we see that $\bar{A}$ has to be connected.
