Clearly the statement is not true because counter examples exist. However consider the following argument:
Definition (Hausdorff Space): The topological space $X$ has the Hausdorff property if for each pair of distinct points $x,x'$ of $X$ there exists neighborhoods $U$ of $x$ and $ U' $ of $x'$ which are disjoint.
Definition (Regular Space): The topological space $X$ is regular if for each point $x$ of $X$ and each closed set $E$ such that $ x \notin E $, there exists a neighbourhood $V$ of $x$ and a neighbourhood $W$ of $E$ which are disjoint.
Now supppose $X$ is a Hausdorff space. Then for every pair $ x,x' \in X $ distinct points, There exists open neighbourhoods $U$ of $x$ and $U_{x'}$ of $x'$ that are disjoint. Fix arbitrary closed set $E$ such that $ x \notin E $. Then there is an union $$ E\subseteq\bigcup_{x' \in E} U_{x'} =:U_{E}$$ which is an open neighbourhood of $E$. Now as $ U \cap U_{x'}=\emptyset $ for every $x'$ distinct from $x$ we conclude that $$ U \cap E= U \cap \big( \bigcup_{x'\in E} U_{x'} \big) = \bigcup_{x'} \big( U \cap U_{x'} \big) = \emptyset.$$ As $E$ was fixed arbitrarily we conclude that $X$ is regular.
Where have I made my mistake?
You cannot ensure that there is one $U$ that works for every $x'\in E$. It may happen that for each $x'\in E$ you can separate $x'$ with $U(x')$ from $U(x,x')\ni x$, but then you would want to take $\bigcap_{x'\in E} U(x,x')$, which might not be open. Your proof does show that if $E$ es compact, such separation is possible, for then you need only intersect finitely many of the $U(x,x')$, and this is open.