The problem is not with your understanding of divided, but rather with your understanding of closed. In the space $X=(0,1)\cup(2,3)$, the sets $(0,1)$ and $(2,3)$ are closed. This is because the topology $\tau$ on $X$ is the subspace (or relative) topology inherited from $\Bbb R$. A subset $U$ of $X$ is open in $X$ if and only if there is a $V\subseteq\Bbb R$ such that $V$ is open in $\Bbb R$ and $V\cap X=U$. Of course $(0,1)$ is open in $\Bbb R$, and $(0,1)\cap X=(0,1)$, so $(0,1)$ is open in $X$. By the definition of closed set this means that $X\setminus(0,1)$ is closed in $X$. And $X\setminus(0,1)=(2,3)$, so $(2,3)$ is closed in $X$. A similar argument shows that $(0,1)$ is also closed in $X$. Indeed, both of these sets are clopen (closed and open) as subsets of $X$, even though they are only open as subsets of $\Bbb R$. Openness and closedness depend not just on the set, but on the space in which it is considered.
You have the same problem with your first example: the sets $[0,1]$ and $[2,3]$ are clopen in the subspace $Y=[0,1]\cup[2,3]$ of $\Bbb R$, not just closed. For example, $[0,1]=\left(-\frac12,\frac32\right)\cap Y$, and $\left(-\frac12,\frac32\right)$ is open in $\Bbb R$, so $[0,1]$ is open in $Y$.
The subspace topology on $Y \subseteq X$ is defined so that a set $S \subseteq Y$ is open iff there is an open set $U \subseteq X$ such that $S = U \cap Y$.
A set $Y \subseteq X$ is disconnected iff it is the union of two disjoint sets which are open in the subspace topology on $Y$.
You're missing the "which are open in the subspace topology" in your reasoning. In the subspace topology on $[0,1] \cup [3,4]$, the sets $[0,1]$ and $[3,4]$ are open because they are $(-1, 2) \cap ([0,1] \cup [3,4])$ and $(2, 5) \cap ([0,1] \cup [3,4])$, for instance.
Best Answer
They are equivalent. Suppose $A$ and $B$ witness that $E$ is not connected according to definition 1. Let $U=\{x\in\mathbb{R}^n:d(x,A)<d(x,B)\}$ and $V=\{x\in\mathbb{R}^n:d(x,A)>d(x,B)\}$. Here $d(x,A)$ means $\inf \{d(x,y):y\in A\}$. Then $U$ and $V$ are open (exercise), and they are obviously disjoint. Since $A\cap\overline{B}=\emptyset$, $d(x,B)>0$ for any $x\in A$ and so $A\subseteq U$, and similarly $B\subseteq V$. Thus $U$ and $V$ witness that $E$ is not connected according to definition 2.
This argument more generally shows that the definitions are equivalent for subsets of any metric space. For more general topological spaces, though, they are not equivalent (see Definition of disconnected subsets in metric spaces and in more general settings), and definition 1 is the standard definition.