$f$ uniformly continuous and $\int_a^\infty f(x)\,dx$ converges imply $\lim_{x \to \infty} f(x) = 0$ Trying to solve

$f(x)$ is uniformly continuous in the range of $[0, +\infty)$ and $\int_a^\infty f(x)dx  $ converges.

I need to prove that:
$$\lim \limits_{x \to \infty} f(x) = 0$$
Would appreciate your help!
 A: Suppose $$\tag{1}\lim\limits_{x\rightarrow\infty}f(x)\ne 0.$$ 
Then we may, and do, select an $\alpha>0$ and a sequence $\{x_n\}$ so that for any $n$, $$\tag{2}x_n\ge x_{n-1}+1$$ 
and 
$$\tag{3}|f(x_n)|>\alpha.$$  
Now, since $f$ is uniformly continuous, there is a $1>\delta>0$ so that 
$$\tag{4}|f(x)-f(y)|<\alpha/2,\quad\text{ whenever }\quad |x-y|<\delta.$$  
Consider the contribution to the integral of the intervals  $I_n=[x_n-\delta/2,x_n+\delta/2]$:
We have, by (3), and (4) that 
$$\biggl|\,\int_{I_n} f(x)\, dx\,\biggr|\ge {\alpha\over2}\cdot \delta$$ for each positive integer $n$.
But, by (2), the $x_n$ tend to infinity. This implies that $\int_a^\infty f(x)\,dx$ diverges, a contradiction.
Having obtained a contradiction, our initial assumption, (1), must be incorrect. Thus, we must have  $\lim\limits_{x\rightarrow\infty}f(x)= 0 $.

Take this with a grain of salt, but,
informally, the idea used above is based on the following:

For clarity, assume $f>0$, here.
If the integral $\int_a^\infty f(x)\,dx$ is convergent, then for large $x$, the graph of  $f$ is close to the $x$-axis "most of the time" and, in fact, the positive $x$-axis is an asymptote of "most of" the graph of $f$.  
I say "most of the time" and "most of" because  is not necessarily so that a function $f$ which is merely continuous must tend to 0 when  $\int_a^\infty f(x)\,dx$   converges. There may be  spikes in the graph of $f$ as you go out in the positive $x$ direction. Though the height of the spikes can be large, the width of the spikes would be small enough so that the integral
converges (so, the sum of the areas of the spikes is finite).
But the graph  of a uniformly continuous function  that is "mostly asymptotic to the $x$-axis" does not have very tall  spikes   of very short widths arbitrarily far out in the $x$-axis.
A: If the integral converges than you have: $\lim_{M\to\infty} \int_a^M f(x) dx = c\ $ for some $c$. Assuming that f does not converge to 0 we have:
$\forall M>0\  \exists p>M: |f(p)|>\varepsilon\ \ $ for some $\varepsilon$.
Without loss of generality we have $\forall M>0\  \exists p>M: f(p)>\varepsilon\ \ $. So there exists $(p_n)_{n=1}^\infty$ s.t. $p_n \to \infty\ $.
Using uniform continuity we have that for $q: |p-q|<\delta\ \ $ the inequality holds: $f(q)>\varepsilon/2\ $. So $\int_a^{p+\delta} f(x) dx - \int_a^{p-\delta} f(x) dx > \delta \cdot \epsilon \ \ $, which means that the sequence $(\int_a^{q_n}f(x)dx)_{n=1}^\infty$ (where $q_0=p_0-\delta,\ q_1=p_0+\delta,\ q_2=p_1-\delta \ldots)\ \ $ is not a Cauchy sequence so it can not converge.
A: For all $\delta>0$, the fact that $\int_0^\infty f(x)dx=\sum\limits_{k=0}^\infty\int\limits_{k\delta}^{(k+1)\delta}f(x)dx$ converges implies that $\lim\limits_{k\to\infty}\int\limits_{k\delta}^{(k+1)\delta}f(x)dx=0$.  Let $\varepsilon>0$ be given.  Let $\delta>0$ be such that $|x-y|<2\delta$ implies $|f(x)-f(y)|<\varepsilon/2$.  Let $N>0$ be such that $k\geq N$ implies $\left|\int\limits_{k\delta}^{(k+1)\delta}f(x)dx\right|<\frac{\varepsilon\delta}{2}$.  Let $x_0\geq (N+1)\delta$.  Then there exists $k\geq N$ such that $x_0$ is in $[k\delta,(k+1)\delta]$.  It follows that $|f(x)-f(x_0)|<\varepsilon/2$ for all $x\in[k\delta,(k+1)\delta]$, and this implies that $\left|\int\limits_{k\delta}^{(k+1)\delta}f(x)dx\right|\geq \delta(|f(x_0)|-\varepsilon/2)$.  Since $\left|\int\limits_{k\delta}^{(k+1)\delta}f(x)dx\right|<\frac{\varepsilon\delta}{2}$, this implies that $|f(x_0)|<\varepsilon$.   Therefore $\lim\limits_{x\to\infty}f(x)=0$.
