Solution (source code)

= Solution

Put $G_N=\sum_{n=1}^N|f_n|$. These are nonnegative <measurable functions> increasing to $G=\sum_{n=1}^\infty|f_n|$, possibly initially with value infinity. <Monotone convergence theorem> gives
$$
\int_{\mathbb R}G=\lim_N\sum_{n=1}^N\int_{\mathbb R}|f_n|=K<\infty.
$$
An infinite value on a <set> of <positive measure> would force an infinite <integral>. Thus $G$ is finite <almost everywhere> and, after setting it to zero on its null exceptional <set> if desired, is integrable.

Where $G$ is finite, the real <series> $\sum_n f_n$ is <absolutely convergent>. Define its sum to be $h$ there and zero on the exceptional <null set>. Measurability follows as an almost-everywhere limit of <partial sums>, and $|h|\le G$ <almost everywhere> gives integrability. Every <partial sum> is dominated by $G$, so <dominated convergence theorem> yields
$$
\boxed{\int_{\mathbb R}h=\lim_N\sum_{n=1}^N\int_{\mathbb R}f_n
=\sum_{n=1}^\infty\int_{\mathbb R}f_n.}
$$
In fact the <convergence> is also in the integrable-function <norm>:
$$
\left\|h-\sum_{n=1}^Nf_n\right\|_1
\le\sum_{n>N}\|f_n\|_1\longrightarrow0.
$$