I know that if $f$ uniformly continuous and $\int_0^{\infty} f(x) \,dx = c$, then $\lim_{x \to \infty} f(x)=0$ (link: $f$ uniformly continuous and $\int_a^\infty f(x)\,dx$ converges imply $\lim_{x \to \infty} f(x) = 0$)
However, suppose that we do not have convergence but $f >0$ and $\int_0^{t} f(x) \,dx \leq M$ for all $t\geq 0$ (thus also $\int_0^{\infty} f(x) \,dx \leq M$ ). Does it still hold that $\lim_{x \to \infty} f(x)=0$?
Intuitively, the proof by David Mitra (see link) implying divergence of the integral would also apply here to conclude that $|\int_0^{\infty} f(x) \,dx |> M$ and thus $\lim_{x \to \infty} f(x)=0$. Is this conclusion correct?