If the graphic of $f : X \to Y$ is closed with $Y$ compact and Hausdorff, then $f$ is continuous. [Proof Verification] As the title says, I want to know whether my proof of the aforementioned proposition is correct, since my argument seems more intricate than needed. I've done the following: to show continuity, I will see that given $x \in X$ and $V \in \mathcal{E}_{f(x)}$ an open neighbourhood of $f(x)$, there exists $U \in \mathcal{E}_x$ open with $f(U) \subseteq V$. Since $V$ is open, $Y \setminus V$ is closed and therefore compact. Now, let $H := G_f \cap  (X \times (Y\setminus V))$ with $G_f$ the graph of $f$. Since $f(x) \in V$, we have that
$$
\{x\} \times (Y\setminus V) \subseteq H^\complement
$$
with the complement taken in $X \times Y$ and so by the tube lemma, there exists $U \in \mathcal{E}_x$ open with 
$$
U \times (Y \setminus V) \subseteq H^\complement. \tag{1}
$$
Now I claim that this concludes the proof, since it implies $f(U) \subseteq V$. In effect, let $y \in U$. Now, if $f(y) \not  \in V$, then $(y,f(y)) \in X \times (Y \setminus V)$ and also $(y,f(y)) \in G_f$ which implies $(y,f(y)) \in H$, contradicting $(1)$.
Is this correct? It seems overly complicated. Also, I have some doubts because I cannot see where do I have used that $Y$ is Hausdorff, and a couple of references state this as a necessary hypothesis. Can it be due to the fact that in the other direction we use that $G_f = (f \times id_Y)^{-1}(\Delta)$ with $\Delta$ closed since $Y$ is Hausdorff?

The proof is in essence correct. I edited some minor things. You can take the complement of $H$ in $X \times Y$ because $G_f$ is closed by assumption and so $H$ is closed in $X \times Y$ (we also need a product open set for the tube lemma to apply). The rest is fine.
You can also use that $\pi_X: X \times Y \to X$ is a closed map (a consequence of that same tube lemma) and that for a closed set $C$ of $Y$ we have that $$f^{-1}[C] = \pi_X[(X \times C) \cap G_f]$$ which is closed when $G_f$ is closed, as we assume. This saves us a "local" argument at $(x,f(x))$.
$Y$ Hausdorff is only needed to see that $G_f$ is closed when $f$ is continuous.
