We do have the following closely related result: Suppose $f \in L^1 ([0,\infty))$, that is $f$ is measurable and $\int_{0}^\infty |f| < \infty$. Then $f$ "nearly" vanishes at infinity. More precisely, for every $\varepsilon > 0$ there exists a set $A \subset [0,\infty)$ with Lebesgue measure $m(A)<\varepsilon$ such that $\lim_{x \to \infty, x \notin A} f = 0$. In other words, the restriction of $f$ to the complement of $A$ vanishes at infinity.
Here's a proof. Clearly it suffices to show that there is a set $A$ of some finite measure which has the above property. First note that $\left\{ x\ge0:\left|f\left(x\right)\right|>1\right\} $ has finite measure (since $f$ is in $L^1$) so there exists $x_1 \ge 0 $ such that $A_1 := \left\{ x\in\left[x_{1},\infty\right):\left|f\left(x\right)\right|>1\right\} $ has measure smaller than $\frac{1}{2}$. Next note that $\left\{ x\ge0:\left|f\left(x\right)\right|>\frac{1}{2}\right\} $ also has finite measure, so there exists $x_2 \ge x_1$ such that $A_2 := \left\{ x\in\left[x_{2},\infty\right):\left|f\left(x\right)\right|>\frac{1}{2}\right\} $ has measure smaller than $\frac{1}{2^2}$. Continuing this way, we get a sequence of numbers $0 \le x_1 \le x_2 \le \cdots $ such that $A_{n}:=\left\{ x\in\left[x_{n},\infty\right):\left|f\left(x\right)\right|>\frac{1}{n}\right\} $ has measure smaller than $\frac{1}{2^n}$. I now claim that $A := \bigcup_{n=1}^{\infty} A_n$ is a set as desired.
First, suppose that $0 \le y_1 < y_2 < \cdots$ is a sequence of numbers disjoint from $A$ which tends to infinity. Let $n$ be a postiive integer. Then $f(y_k) > \frac{1}{n}$ for at most finitely many $k$, since otherwise there would be a $k$ such that $y_k \ge x_n$ and $f(y_k) > \frac{1}{n}$, contradicting the assumption that $y_k$ is not in $A$ (and therefore in particular not in $A_n$). It now follows that $\lim_{k \to \infty} f(y_k) = 0$.
Second, let us show that $A$ has finite measure. Indeed, $m\left(A\right)=m\left(\bigcup_{n=1}^{\infty}A_{n}\right)\le\sum_{n=1}^{\infty}m\left(A_{n}\right)\le\sum_{n=1}^{\infty}\frac{1}{2^{n}}=1$. Now we are done.
The conclusion cannot be strengthened to obtain an $A$ with measure zero, even if $f$ is continuous, as the other answers you got clearly show.