So, here's my function
$f:\mathbb{R} \to \mathbb{R}$
$f(x)=1$ for $x \in \mathbb{N}$
$f(x)=2$ for $x \in (0,1)$
$f(x)=0$ for anything else
I tried solving it this way:
$f_k=0$ for $k \in (\mathbb{R}-\mathbb{N})\ \cup(0,1)$
$f=\sum_{R-N\ \cup(0,1)}f_k = 0 < \infty =>$ f is lebesgue integrable
Can I prove from this point that it's not ( or it is ) Riemann integrable?
Then function is Lebesgue integrable.
Note that $m(\mathbb{N})=0$ and $$\int f= \int_{\mathbb{N}}f+ \int_{(0,1)}f+ \int_{(-\infty,0]}f+\sum_{n=1}^{\infty} \int_{(n,n+1)}f=0+2+0+0=2$$
$f$ is not Riemman integrable in because Riemman integration makes sence in bounded regions.
But we can say that the improper integral of $f$ as an extension of the Riemman integral is $2$ (this can be proved by writing the integral of $f$ over the whole real line as a limit of a sum of integrals in bounded intervals)
Also here is a reference of extended integrals in unbounded regions(intervals)
http://www.matha.rwth-aachen.de/de/lehre/ws07/calculus/Lecture_12.pdf