I have $$\int_{\mathbb R} f\,d\mu = \lim_{n\to\infty}\int_{[0,n]} f\,d\mu$$
So $$\begin{align}\int_{\mathbb R}f\,d\mu &= \lim_{n\to\infty}\int_{[0,n]}\chi_{[0,\infty)}e^{-x}\\ &=\lim_{n\to\infty}\int\chi_{[0,n]}e^{-x}\,d\mu \\ &= \lim_{n\to\infty}ne^{-x}=\infty. \end{align}$$
Is this correct?
No. $$\int \chi[0,n] e^{-x} d\mu(x) \not = n e^{-x}$$ What even is $x$ on the right-hand side?