Expected value of $X^{-}$. Let $X$ be a real variable that has expectation (we don't know if it's discrete or continuous). Let F be the CDF of X. I need to prove the following equality:
$$E(X)=\int_0^{+\infty}(1-F(x))dx -\int_{-\infty}^0F(x)dx.$$
I have used that $E(X)=E(X^+)-E(X-)$, where $X^{+}=\max(0,X)$ and $X^{-}=\max(0,-X)$.
I have already proved that $$E(X^+)=\int_{0}^\infty (1-F(x)) dx,$$ so what's left to be proved is $$E(X^-)=-\int_{-\infty}^0 F(x)dx. $$

My attempt:
As $X^-\geq0$, it is known that $E(X^-)=\int_{0}^\infty (1-F_{X^-}(x))dx$.
I have proved that $F_{X^{-}}(x)=1-F(-x^{-})=1-P(X<-x)$ for $x \geq0$ and $F_{X^{-}}(x)=0$ for $x<0$.
So we have that
$$E(X^-)=\int_{0}^\infty (1-F_{X^-}(x))dx=\int_{0}^\infty F(-x^{-})dx.$$
How can I prove that $$\int_{0}^\infty F(-x)dx=\int_{0}^\infty F(-x^{-})dx \left(\int_{0}^\infty P(X\leq-x)dx=\int_{0}^\infty P(X<-x)dx \right)$$ is true?
(I don't know how to do it because $X$ can be discrete or continuous.)
 A: The answers in the linked question uses the Stieltjes integral wrt $dF(x)$ which I want to avoid and stick to Lebesgue Integral and Properties of expectation. That is why I am posting this as an alternative way.
What you really need is two steps:-
Lemma:- For a non-negative random variable $X$ . We have $$\Bbb{E}[X]=\int_{0}^{\infty}\Bbb{P}(X\geq t)\,dt$$.
This is due to Tonelli's Theorem
$$\Bbb{E}[X]=\Bbb{E}[\int_{0}^{\infty}\,\mathbf{1}_{[0,X(\omega)]}dt]=\Bbb{E}[\int_{0}^{\infty}(\mathbf{1}_{\{0\leq t\leq X(\omega)\}})\,dt]$$
$$=\int_{0}^{\infty}\Bbb{E}[\mathbf{1}_{\{0\leq t\leq X(\omega)\}}]\,dt = \int_{0}^{\infty}\Bbb{P}(X\geq t)\,dt$$.
This tells you that :-
$$\Bbb{E}[X^{+}]=\int_{0}^{\infty}\Bbb{P}(X^{+}\geq t)\,dt=\int_{0}^{\infty}\Bbb{P}(X\geq t)\,dt=\int_{0}^{\infty}(1-F(t))\,dt$$
and $$\Bbb{E}[X^{-}]=\int_{0}^{\infty}\Bbb{P}(X^{-}\geq t)\,dt = \int_{0}^{\infty}\Bbb{P}(-X\geq t)\,dt=\int_{0}^{\infty}\Bbb{P}(X\leq - t)\,dt=\int_{0}^{\infty}F(-t)\,dt$$ .
Change variables to $t=-z$ to get
$$\Bbb{E}[X^{-}]=\int_{-\infty}^{0} F(z)\,dz$$
You have the expressions for $\Bbb{E}[X^{+}]$ and $\Bbb{E}[X^{-}]$ and as $X=X^{+}-X^{-}$, you have by Linearity of Expectation
$$\Bbb{E}[X]=\int_{0}^{\infty}(1-F(t))\,dt-\int_{-\infty}^{0} F(t)\,dt$$
EDIT: The op seems to be confused about how we can say $\int_{0}^{\infty}\Bbb{P}(X\geq t)\,dt= \int_{0}^{\infty}\Bbb{P}(X> t)\,dt$. To clairfy we claim that $\displaystyle\int_{\Bbb{R}}\Bbb{P}(X=t)\,dt = 0$. Which in particular implies that $\displaystyle\int_{0}^{\infty}\Bbb{P}(X=t)\,dt=0$ as $\Bbb{P}(X=t)$ is a non-negative function of $t$. This would show that $\displaystyle\int_{0}^{\infty}\Bbb{P}(X\geq t)\,dt=\int_{0}^{\infty}\Bbb{P}(X> t)\,dt$ and $\displaystyle\int_{0}^{\infty}\Bbb{P}(X\leq t)\,dt=\int_{0}^{\infty}\Bbb{P}(X< t)\,dt.\\\\$
We have $$\int_{\Bbb{R}}\Bbb{P}(X=t)\,dt=\int_{\Bbb{R}}\Bbb{E}(\mathbf{1}_{X=t})\,dt=\Bbb{E}(\int_{\Bbb{R}}\mathbf{1}_{X=t}\,dt)$$ .
The above is possible again thanks to Tonelli.
Now when we write $ \int_{\Bbb{R}}\mathbf{1}_{X=t}\,dt$ we mean this as a function of $t$ for fixed $\omega\in\Omega$. (Recall here how we evaluate double integrals by solving iterated integrals).
This is the same as $\int_{\Bbb{R}}\mathbf{1}_{\{X(\omega)\}}dt$ which is the integral of the indicator of the singleton set $\{X(\omega)\}$. But this is just $\lambda(\{X(\omega)\})=0$ as the Lebesgue Measure of a singleton is $0$.
This gives us $$\Bbb{E}(\int_{\Bbb{R}}\mathbf{1}_{X=t}\,dt)=\Bbb{E}(0)=0$$
