As it's said in comments, it's not true that if $\int_0^\infty f^2(x)\, dx$ converges then $\lim\limits_{x \to \infty} f^2(x) = 0$. Counterexample: let $w(x)$ be bump function: $w(0) = 1$, $w(x) = 0$ if $|x| > 1$, $w(x) \in [0, 1]$, $w$ continuously differentiable. Now, let $f(x) = \sum\limits_{n=0}^\infty w(2^n (x - n))$ - narrow bumps around integer numbers.
To prove the result, we need the restriction on derivative. Note that if $|f(x_0)| = \epsilon > 0$, then (assuming wlof $f(x_0) > 0$), $f(x_0 + x) \geq \epsilon / 2$ for $x \in \left[0, \frac{\epsilon}{2C}\right]$ (here we use $|f'| \leq C$),
and thus $\int_{x_0}^x f^2(t)\, dx \geq \frac{\epsilon^3}{8C}$. However, by Cauchy criteria, for all large enough $x_0$ and $x > x_0$, we have $\int_{x_0}^x f^2(t)\, dx <\frac{\epsilon^3}{8C}$, and thus $|f(x)| < \epsilon$.