So I was trying to do this,and asked my professor to tell me if it was correct, but he wouldn't look at my work, here is my attemp to a solution.
Proof: Let $\Delta$ be the diagonal. $$\implies:$$
Let $X$ be $\mathcal{T}_2$ Let x, y $\in$ X
If $x \neq y \implies x\times y \not \in \Delta$
Since X is Hausdorff there must be $U, V$ nb of $x, y$ that are disjoint.
So $x \times y \in U \times V \subset X \times X -\Delta$, since $U, V$ have no common elements, then $X\times X -\Delta$ is an open set in $X\times X$ and $\Delta$ is a closed set.
$$\Leftarrow: $$ Let $\Delta$ be a closed set in $X \times X$
Let $x\neq y$ such that $x,y \in X$
$\implies x \times y \in X-\Delta \in X \times X$
Then there must exist $U, V \subset X$ such that $x \times y \in U\times V \subset X \times X-\Delta$ and $U, V$ are disjoint for otherwise they'd be in $\Delta$ (or at least an element of them would be in $\Delta$).
$\implies X$ is $\mathcal{T}_2$
Proved in both directions, the proof is finished.
Can you tell me if this attemp is correct?