Suppose $\int_E |f| < \infty$ for any measurable $E\subset\mathbb{R}^n$ with $m(E) < \infty.$ Prove that there are $f_1 \in L^1(\mathbb{R}^n)$ and $f_2 \in L^{\infty}(\mathbb{R}^n)$ such that $f=f_1+f_2$.
My idea is that we put the "thing" not bounded in $f_1 \in L^1(\mathbb{R}^n)$ and put the "thing" that is bounded but not summable (may be some bounded value at infinity?). But I do not know how to write it rigorously.
WLOG, $f$ is nonnegative. Let $\mu$ be Lebesgue measure on $\mathbb R^n.$ Suppose we can show that
$$\tag 1 \int_{\{f>m\}} f\, d\mu < \infty\,\,\text { for some } m\in \mathbb N.$$
Then we can take $f_1 = f\cdot\chi_{\{f>m\}}, f_2 = f\cdot\chi_{\{f\le m\}}.$
Suppose $(1)$ fails. Then $\int_{\{f>m\}} f\ d\mu = \infty$ for all $m.$ By the hypothesis on $f,$ this implies $\mu(\{f>m\})=\infty$ for all $m.$
Let $m = 1.$ Then $\mu {\{f>1\}} = \infty.$ By the intermediate value property of Lebesgue measure, there exists a set $E_1 \subset \{f>1\}$ with $\mu(E_1) = 1.$ We continue inductively: Suppose disjoint $E_1, \dots, E_m$ have been chosen with $E_k \subset \{f>k\}$ and $\mu(E_k) = 1/k^2,$ $k =1,\dots ,m.$ Because $\mu(\{f>m+1\}) = \infty,$
$$\tag 2 \mu(\{f>m+1\} \setminus (E_1 \cup \cdots \cup E_m)) = \infty$$
as well. Thus, using the IVP again, there exists $E_{m+1}\subset \{f>m+1\} \setminus (E_1 \cup \cdots \cup E_m)$ with $\mu(E{m+1}) = 1/(m+1)^2.$
By induction we thus have a sequence $E_1, E_2, \dots$ with the properties described above. Let $E= \cup_m E_m.$ Then $\mu(E) < \infty.$ But
$$\int_E f\, d\mu = \sum_{m=1}^{\infty} \int_{E_m} f\, d\mu \ge \sum_{m=1}^{\infty} m\cdot\frac{1}{m^2} = \sum_{m=1}^{\infty} \frac{1}{m} = \infty.$$
That contradicts the hypothesis on $f.$ Thus $(1)$ holds, and we're done.