Expected value as integral of survival function
$$A_t=[T\geqslant t]\qquad S(t)=E[\mathbf 1_{A_t}]\qquad T=\int_0^\infty\mathbf 1_{A_t}\,\mathrm dt$$
Consider for any $n > 0$, $$\begin{align*} \int_{t=0}^n t f_T(t) \, dt &= \int_{t=0}^n \left(\int_{s=0}^t \, ds\right) f_T(t) \, dt \\ &= \int_{t=0}^n \int_{s=0}^t f_T(t) \, ds \, dt \\ &= \int_{s=0}^n \int_{t=s}^n f_T(t) \, dt \, ds \\ &= \int_{s=0}^n F_T(n) - F_T(s) \, ds. \end{align*}$$ Then as $n \to \infty$, $F_T(n) \to 1$ and we obtain $${\rm E}[T] = \int_{s=0}^\infty 1 - F_T(s) \, ds = \int_{s=0}^\infty S_T(s) \, ds.$$
Another way of thinking:
Consider $n>0$, integration by parts we have
$\int_{0}^{n}xF(dx)=nF(n)-\int_{0}^{n}F(x)dx = n-nS(n)-\int_{0}^{n}(1-S(x))dx$
$=\int_{0}^{n}S(x)dx-nS(n)$
where $S(x)=1-F(x)$ is the survival function.
As $n\to \infty$, the second part converges to zero. To see this, notice that $S(x)=\int_{x}^{\infty}f(t)dt$, providing $E(X)$ do exist,
$\lim_{x\to \infty}xS(x)=\lim_{x\to \infty} x\int_{x}^{\infty}f(t)dt \leq \lim_{x\to \infty} \int_{x}^{\infty}tf(t)dt=0$