[Corollary 5.10.9, EGA]

Lemma 51.3.2. Let $A$ be a Noetherian local ring which is catenary and $(S_2)$. Then $\mathop{\mathrm{Spec}}(A)$ is equidimensional.

Proof. Set $X = \mathop{\mathrm{Spec}}(A)$. Say $d = \dim (A) = \dim (X)$. Inside $X$ consider the union $X_1$ of the irreducible components of dimension $d$ and the union $X_2$ of the irreducible components of dimension $< d$. Of course $X = X_1 \cup X_2$. If $X_2 = \emptyset$, then the lemma holds. If not, then $Z = X_1 \cap X_2$ is a nonempty closed subset of $X$ because it contains at least the closed point of $X$. Hence we can choose a generic point $z \in Z$ of an irreducible component of $Z$. Recall that the spectrum of $\mathcal{O}_{Z, z}$ is the set of points of $X$ specializing to $z$. Since $z$ is both contained in an irreducible component of dimension $d$ and in an irreducible component of dimension $< d$ we obtain nontrivial specializations $x_1 \leadsto z$ and $x_2 \leadsto z$ such that the closures of $x_1$ and $x_2$ have different dimensions. Since $X$ is catenary, this can only happen if at least one of the specializations $x_1 \leadsto z$ and $x_2 \leadsto z$ is not immediate! Thus $\dim (\mathcal{O}_{Z, z}) \geq 2$. Therefore $\text{depth}(\mathcal{O}_{Z, z}) \geq 2$ because $A$ is $(S_2)$. However, the punctured spectrum $U$ of $\mathcal{O}_{Z, z}$ is disconnected because the closed subsets $U \cap X_1$ and $U \cap X_2$ are disjoint (by our choice of $z$) and cover $U$. This is a contradiction with Lemma 51.3.1 and the proof is complete. $\square$

In your comment you can use Markdown and LaTeX style mathematics (enclose it like $\pi$). A preview option is available if you wish to see how it works out (just click on the eye in the toolbar).