Prove the integration by parts property of expectation of a random variable, that is, for a random variable $X$ with cumulative distribution function $F_X$ and probability density function $f_X$,
\begin{align*}
E[X] = \int_{-\infty}^{\infty}x f_X(x)\, dx = \int_{0}^{\infty}(1 - F_X(x)) \,dx - \int_{-\infty}^{0}x F_X(x)dx
\end{align*}
My attempt:
\begin{align*} E[X] &= \int_{-\infty}^{\infty}x f_X(x)\, dx \\ &= \bigg[xF(x)\bigg]_{-\infty}^{\infty} - \int_{-\infty}^{\infty}F_X(x)\, dx \end{align*}
But I get stuck here itself and it leads nowhere. So how do I use integration by parts to prove the result?

As right hand side guides you, First split negative and positive parts. Then try to prove it.
An intuitive proof (Maybe you didn't believe it is a proof!):
Consider a vertical element in graph of $f(x)$, and prove it occurs in left hand side $(xf(x))$ as many as in right hand side$((1-F(x))$ or $(xF(x)))$.