Suppose $f$ is measurable. Does $\int_0^\infty f(x) dx = \lim_{n \to \infty} \int_0^n f(x) dx$ for $f \geq 0$ or $f$ not positive?
If we require $f(x) \geq 0$, the equality holds by Lebesgue's Increasing Convergence Theorem. We can do this by noticing that $\lim_{n \to \infty} \int_0^n f(x) dx = \lim_{n \to \infty} \int_0^\infty f_n(x) dx$ and define $f_n(x) = f(x)$ on $[0,n]$ and $f_n(x)=0$ everywhere else. Hence, $f_n \leq f_{n+1}$, $f_n \to f$, and LICT holds.
However, if $f$ is not positive, then the equality may not hold as we cannot invoke Lebesgue's Dominated Convergence Theorem without an integrable $g(x)$ such that $|f(x)| \leq g(x)$.
Is my analysis correct?
The Lebesgue integral $\int_0^\infty f(x) dx $ exists if and only if $|f|$ is Lebesgue integrable on $[0,\infty)$; this is in contrast with the improper Riemann integral. Indeed, the Lebesgue integral is built by considering the positive and negative parts of $f$ separately; no conditional convergence (convergence-by-cancellation) can happen with this approach.
So, if $\int_0^\infty f(x) dx $ exists, then $|f|$ qualifies as a dominating function for your argument.
An example where $\lim_{n \to \infty} \int_0^n f(x) dx$ exists but $f$ is not Lebesgue integrable on $[0,\infty]$ is $$f(x) = x-\lfloor x\rfloor-\frac12$$ Another example is $f(x)=\dfrac{\sin x}{x}$; here the limit $\lim_{T \to \infty} \int_0^T f(x) dx$ exists even as $T$ runs through all positive values.