There is a hint to solve this by using integration by parts. So I have $$ u = x \space \mbox{then} \space u'=1$$ $$v' = F(x) -1 \space \mbox{then} \space = ? $$
QUESTION:
What is $v'$ ?
What is the theoretical idea behind this? I would not have thought of this approach without the hint.
Observe that for a continuous random variable, (well absolutely continuous to be rigorous):
$$\mathsf P(X> x) = \int_x^\infty f_X(y)\operatorname d y$$
Then taking the definite integral (if we can):
$$\int_0^\infty \mathsf P(X> x)\operatorname d x = \int_0^\infty \int_x^\infty f_X(y)\operatorname d y\operatorname d x$$
Observe that we are integrating over the domain where $0< x< \infty$ and $x< y< \infty$, which is to say $0<y<\infty$ and $0< x < y$.
$$\begin{align}\int_0^\infty \mathsf P(X> x)\operatorname d x = & ~ \iint_{0< x< y< \infty} f_X(y)\operatorname d (x,y) \\[1ex] = & ~ \int_0^\infty \int_0^y f_X(y)\operatorname d x\operatorname d y\end{align}$$
Then since $\int_0^y f_X(y)\operatorname d x = f_X(y) \int_0^y 1\operatorname d x = y~f_X(y)$ we have:
$$\begin{align}\int_0^\infty \mathsf P(X> x)\operatorname d x = & ~ \int_0^\infty y ~ f_X(y)\operatorname d y \\[1ex] = & ~ \mathsf E(X \mid X\geq 0)~\mathsf P(X\geq 0) \\[1ex] = & ~ \mathsf E(X) & \textsf{when $X$ is strictly positive} \end{align}$$