Suppose you have a function $f$ on $\mathbb{R}$, such that $$\int_{-\infty}^{\infty} | f(x) | \, \mathrm{d} x < \infty$$ and $$\int_{-u}^u |f(x)| \, \mathrm{d} x = \mathcal{O}(u)$$ for $u \to 0$.
Is it true that then $f$ is in $L^p(\mathbb{R})$ for any $p \geq 1$?
I think the answer is yes, because $f$ doesn't blow up at zero but I'm struggling with a formal proof. I've tried to look at the measure $\mu$ defined by $\mu(\mathrm{d}x) = |f(x)| \mathrm{d}x$, exploiting the fact that $\mu(B)<\infty$ for any Borel set on the real line, but didn't suceed.
An example which can be adapted as required by fiddling a little with the exponents occurring below. Let $I_0=[0,1)$, $I_n=[\sum_{k=1}^n \frac{1}{k^2}, \sum_{k=1}^{n+1} \frac{1}{k^2})$, which is of length $1/n^2$. Define $f(x)=1/n^{1/2}$ on the $I_n$'s ($n\ge 1$) and $0$ elsewhere. $f$ is clearly $L^1$ but not $L^p$ if $p\ge 2$. Also, $f\equiv 0$ on $[0,1)$.