Introduce the
D3808: Function positive hypograph for $f$ as
\begin{equation}
\Gamma
: = \{ (x, t) \in X \times \mathbb{R} : 0 \leq t \leq f(x) \}
\end{equation}
and let $\Gamma_t = \{ x \in X : (x, t) \in \Gamma \}$ denote a corresponding slice set at each $t \in \mathbb{R}$. We have the chain of equivalencies
\begin{equation}
\begin{split}
(x, t) \in \Gamma \quad
& \iff \quad 0 \leq t \leq f(x) \\
& \iff \quad x \in \{ f \geq t \} \\
\end{split}
\end{equation}
Thus we have the equality
\begin{equation}
\begin{split}
\Gamma_t & = \{ x \in X : (x, t) \in \Gamma \} \\
& = \{ x \in X : f(x) \geq t \} \\
& = \{ f \geq t \}
\end{split}
\end{equation}
Let $\upsilon$ now denote the Lebesgue measure on $\mathbb{R}$. We may now apply results
to obtain
\begin{equation}
\int_X f \, d \mu = (\mu \times \upsilon)(\Gamma) = \int_{[0, \infty]} \mu(\Gamma_t) \, d \upsilon = \int_{[0, \infty]} \mu( f \geq t ) \, d t
\end{equation}
$\square$