Take $f:[0, + \infty) \rightarrow [0, + \infty)$ such that $f(x)=x$ if $x \in \mathbb{N}$ and $f(x)=0$ if $x \notin \mathbb{N}$
Also note the $f(x)$ is non-negative.
We have that the limit if $f(x)$ as $x \rightarrow + \infty$ does not exist.
From Lebesgue's theorem, $f$ is Riemman integrable because is discontinuous in a countable set and every countable set has measure zero.
A set $A$ has measure zero if $\forall \epsilon>0$ exist a sequence of open intervals $(a_n,b_n)$ such that $A \subseteq \bigcup_{n=1}^{\infty}(a_n,b_n)$ such that $\sum_{n=1}^{\infty}(b_n-a_n) \leqslant \epsilon$
Now $\int_0^{\infty}f(x)= \sum_{k=1}^{\infty} \int_{k-1}^kf(x)dx$
The O.P as an exercise he/she can prove that $\int_{k-1}^kf(x)dx=0, \forall k \in \mathbb{N}$ and conclude that $\int_0^{\infty}f(x)dx=0$