I was trying to figure out how to determine whether it converges given a specific $a_1, a_2$, and how to find out the sum when it converges. I didn't manage to fully solve it, but here is some progress that someone else might be able to build off.
WLOG, let $a_1=1$ and $a_2=d$ (you can assume this since the sequence terms are linearly proportional with $a_1$ when $a_2$ is scaled appropriately) and let $f(d)$ be the sum of $a_n$. If $d < 0$, the sequence goes $$1, d, 1-d, 1-2d, -d, 1-d, 1, -d, \cdots$$
so $f(d)=1+d+1-d+1-2d-d+1-d+f(-d)\to f(d)=4-4d+f(-d)$ for $d < 0$.
If $d>1$, then the sequence goes $$1, d, d-1, 1, |2-d|, \cdots$$
so $f(d)=1+d+d-1+f(|2-d|)\to f(d)=2d+f(|2-d|)$ for $d > 1$. Let $k = \left[\frac{d}{2}\right]$, where $[x]$ denotes the nearest integer to $x$, so that $2k$ is the even integer closest to $d$. Then unwrapping this recursion using this yields that $$f(d)=2kd-2k(k-1)+f(|d-2k|)\tag 1$$ for $d > 1$, so that $|d-2k|\in(0,1)$ (this actually holds for $0 < d < 1$ too, but that would just say that $f(d)=f(|d|)$ which is trivial).
That leaves $0 < d < 1$. Let $k = \left\lfloor\frac{1}{d}\right\rfloor$. There are two cases here depending on the parity of $k$. If $k$ is odd, the sequence would go $$1, d, 1-d, 1-2d, d, 1-3d, 1-4d, d, 1-5d, \cdots, d, 1-kd, (k+1)d-1$$ where every third term is a $d$. If $k$ is even, the sequence would go $$1, d, 1-d, 1-2d, d, 1-3d, 1-4d, d, 1-5d, \cdots, 1-(k-1)d, 1-kd, d, (k+1)d-1$$ where again, every third term is a $d$.
With $k$ even: $$f(d)=\frac{k}{2}d+\sum_{r=0}^k(1-rd)+d\cdot f\left(k+1-\frac{1}{d}\right)$$ which simplifies to $$f(d)=-\frac{k^2}{2}\cdot d+k+1+d\cdot f\left(k+1-\frac{1}{d}\right)$$ (this actually holds for $k = 0\iff d>1$ as well)
With $k$ odd: $$f(d)=\frac{k+1}{2}d+\sum_{r=0}^{k-1}(1-rd)+d\cdot f\left(-k+\frac{1}{d}\right)$$ which simplifies to $$f(d)=\frac{2-(k-1)^2}{2}d+k+d\cdot f\left(-k+\frac{1}{d}\right)$$
Let $d\in(0,1)$ be represented as $[k_1, k_2, \cdots]$ and let $d_n$ be $[k_n, k_{n+1}, \cdots]$. Generate a sequence $k_n$ such that $0<d_n<1$ and if $k_n$ is odd, $d_n=\frac{1}{k_n+d_{n+1}}$, and if $k_n$ is even, $d_n=\frac{1}{k_n+1-d_{n+1}}$. This is similar to the continued fraction representation, but not exactly. As an example, $\frac{1}{\sqrt{2}}=\frac{1}{1+\frac{1}{2+1-\frac{1}{1+\frac{1}{ \sqrt{2}}}}}$, so $\frac{1}{\sqrt{2}}=[1,2,1,1,2,1,\cdots]$
Then if $k_n$ is odd, $$f(d_n)=\frac{2-(k_n-1)^2}{2}d_n+k_n+d_n\cdot f(d_{n+1})$$
and if $k_n$ is even, $$f(d_n)=-\frac{k_n^2}{2}\cdot d_n+k_n+1+d_n\cdot f(d_{n+1})$$
In order for $f(d)$ to exist, the limit as you apply this infinite times needs to exist.
If $d\in(0,1)$ has a periodic representation, then I believe that means that $f(d)$ exists. With $d=\frac{1}{\sqrt{2}}$, you'd get that $f(d)=2+\frac{7}{2\sqrt{2}}=2+\frac{7}{2}d$, and for $d=\frac{-1+\sqrt{5}}{2}$, you'd get that $f(d)=2+\sqrt{5}=3+2d$
It might be helpful to note that
$$\left|f(d_n)-1-\frac{1}{2d_n}-d_n\cdot f(d_{n+1})\right|\le \frac{d_n}{2}$$
This was obtained by setting bounds from the cases of $k_n$ being even and odd.