Whether or not a series converges does not depend on if $\lim_{n\to\infty}a_n=0$, rather it is the converse that is true.
If a series converges, then $\lim_{n\to\infty}a_n=0$.
But $\lim_{n\to\infty}a_n=0$ does not prove that a series converges.
Your series is an example of one that does not converge and approaches $0$.
Here is my explanation:
If a sum gets closer and closer to some limit, then its partial sums must increase by less and less. Upon reaching the limit, the partial sums no longer increase and we must have the following:$$\lim_{n\to\infty}\sum_{i=1}^{n}{f(i)}=\lim_{n\to\infty}\sum_{i=1}^{n+1}{f(i)}$$Due to the nature of $\infty$.
Furthermore, we have such:
$$\lim_{n\to\infty}\sum_{i=1}^{n}{f(i)}=\lim_{n\to\infty}\sum_{i=1}^{n+1}{f(i)}$$$$\lim_{n\to\infty}f(1)+f(2)+f(3)+\cdots f(n)=\lim_{n\to\infty}f(1)+f(2)+f(3)+\cdots f(n)+f(n+1)$$$$0=\lim_{n\to\infty}f(n+1)$$
One can prove a convergent series has this property, but not that a series with this property is convergent.
This means that a series without this property must be divergent, because I just proved all convergent series have this property, meaning if it doesn't, it can't be convergent.
Also, (fun fact) a series' sum is not dependent on whether it converges.
For example:$$\sum_{n=1}^{\infty}n=-\frac12$$If you don't believe, you can look it up. It even has its own wiki page.
Best Answer
You're misunderstanding what the divergence test tells you. Is says that if $\lim_{n\to\infty}a_n\neq0$, then $\sum_{n=1}^\infty a_n$ diverges. This is not the same as it's converse, i.e. that if the limit is zero then the series converges. There are lots of series where the terms go to zero but which do not converge, and the harmonic series is a prime example of this. The divergence test is simply there to help you rule out series from converging. Take for example the series
$$\sum_{n=1}^\infty\frac{1+n}{n}.$$
Since
$$\lim_{n\to\infty}\frac{1+n}{n}=\lim_{n\to\infty}\left(\frac{1}{n}+1\right)=1,$$
the divergence test tells us that it diverges. However if we take the harmonic series
$$\sum_{n=1}^\infty\frac{1}{n},$$
we have that
$$\lim_{n\to\infty}\frac{1}{n}=0,$$
but the series still diverges (which can be checked using, for example, the integral test). What we can conclude is thus that