Find $\sum\limits_{k\, \text{ odd}} \frac{2(k^2-1)}{k^4+k^2+1}$

I write here so everyone can see. I finally solve it.

First, note that $$\sum_{k \text{ odd}} \frac{2(k^2-1)}{k^4+k^2+1}=\sum_{k=1}^{\infty}(-1)^{k-1}\frac{2k-1}{k^2-k+1},$$ because $$\sum_{k=1}^{\infty}(-1)^{k-1}\frac{2k-1}{k^2-k+1}=\sum_{k\, \text{odd}}\left(\frac{2k-1}{k^2-k+1}-\frac{2(k+1)-1}{(k+1)^2-(k+1)+1}\right).$$

Now, use formula $$\frac{1}{\cos \pi z}=\frac{4}{\pi}\sum_{k=0}^{\infty} (-1)^k \frac{2k+1}{(2k+1)^2-(2z)^2}=\frac{4}{\pi}\sum_{k=1}^{\infty} (-1)^{k-1} \frac{2k-1}{(2k-1)^2-(2z)^2}$$ and set $z=i\cdot \alpha.$ We find $$\text{sech}(\pi \alpha)=\frac{4}{\pi}\sum_{k=1}^{\infty}(-1)^{k-1}\frac{2k-1}{(2k-1)^2+4\alpha^2}$$ and then setting $\displaystyle\alpha = \frac{\sqrt{3}}{2}$ we find $$\text{sech}\left(\frac{\sqrt{3}\pi}{2}\right)=\frac{4}{\pi}\sum_{k=1}^{\infty}(-1)^{k-1}\frac{2k-1}{(2k-1)^2+3}=\frac{1}{\pi}\sum_{k=1}^{\infty}(-1)^{k-1}\frac{2k-1}{k^2-k+1}$$ or $$\sum_{k \text{ odd}} \frac{2(k^2-1)}{k^4+k^2+1}=\sum_{k=1}^{\infty}(-1)^{k-1}\frac{2k-1}{k^2-k+1}=\pi \text{sech}\left(\frac{\sqrt{3}\pi}{2}\right).$$


Added: Formula $$\frac{1}{\cos \pi z}=\frac{4}{\pi}\sum_{k=0}^{\infty} (-1)^k \frac{2k+1}{(2k+1)^2-(2z)^2}$$ is derived from (same link as above) $$\pi \tan \pi z = \sum_{k=0}^{\infty} \frac{8z}{(2k+1)^2 - 4z^2}, \qquad (2z \neq \pm 1, \pm 3, \dots).$$ From $\dfrac{1}{\sin z}=\cos z + \tan \dfrac{z}{2}$ we find, further, that $$\frac{\pi}{\sin \pi z}=\frac{1}{z}-\frac{2z}{z^2-1^2}+\frac{2z}{z^2-2^2}\pm\cdots, \qquad (z \neq 0, \pm 1, \pm 2, \dots),$$ and finally, replacing $z$ here by $\dfrac{1}{2}-z,$ $$\frac{\pi}{4 \cos \pi z}=\frac{1}{1^2-(2z)^2}-\frac{3}{3^2-(2z)^2}+\frac{5}{5^2-(2z)^3}\pm \cdots, \qquad (2z \neq \pm 1, \pm 3, \dots).$$