I want to show the following function is negative for $z\in [0,1)$: $$f(z) = -1 + z^2(z-1) + 2\sum_{k=0}^\infty (-1)^k z^{(2k+1)^2+1}. $$
By Tauberian theorem, I know that $\lim_{z\to 1^-}f(z)=0$. I also know that $\lim_{z\to 1^-} f'(z)=1$ so there is a close enough neighborhood of $1$ that $f$ is always negative. However, I want to give more details to show the negativity of the function $f$. I have included a plot of $f$ below. The function diverges at $x=1$, hence it is not easy to estimate it by truncating the series for $z\to 1$.

Very close to $z=1$ we have $$z^{(2k+1)^2+1}=1+\left((2 k+1)^2+1\right) (z-1)+(2 k+1)^2 \left(2 k^2+2 k+1\right) (z-1)^2+O\left((z-1)^3\right)$$ Ignoring the higher order terms $$\sum_{k=0}^\infty (-1)^k z^{(2k+1)^2+1}=(z-2) z+\frac{3}{2}\quad \implies \quad f(z)=(z-1) \left(z^2+2 z-2\right)$$ which is negative.
Ckecking the summation
I have serious divergence problems when I try to make the expansion to $O\left((z-1)^4\right)$.
If it was $$\sum_{k=0}^\infty (-1)^k z^{(2k+0)^2+1}=\frac{1}{2} z \left(\vartheta _4\left(0,z^4\right)+1\right)$$ the plot of the two $f(z)$ are quite similar. May be, an idea here ?