How to prove that $S=\sum_{n=0}^{\infty}\frac{(\sqrt{2}-1)^{2n+1}}{(2n+1)^2}=\frac{\pi^2}{16}-\frac{1}{4}\log^2(\sqrt{2}-1)?$

I shall be continuing from the last two integrals of your work $$\int_0^{\sqrt 2-1} \frac{\tanh^{-1}x}{x} dx =\frac{1}{2}\int_0^{\sqrt 2-1} \left(\frac{\log(1+x)}{x}-\frac{\log(1-x)}{x}\right)dx$$ These two integrals posses non-elementary antiderivatives in terms of special function Dilogarithm function so by definition we have $$=\frac{1}{2}\left(\operatorname{Li}_2(x)-\operatorname{Li}_2(-x)\bigg|_0^{\sqrt 2-1}\right)=\frac{1}{2}\left(\operatorname{Li}_2\left(\sqrt2 -1\right)-\operatorname{Li}_2\left(1-\sqrt 2\right)\right)\cdots(1)$$ Using the last identity [3] we have $$\operatorname{Li}_2(1-\sqrt 2)= -\frac{\pi^2}{6}-\frac{1}{2}\ln^2(\sqrt 2-1)+\operatorname{Li}_2\left(\frac{1}{1-\sqrt 2}\right)=\frac{\pi^2}{6}-\frac{1}{2}\ln^2(\sqrt 2-1)-\operatorname{Li}_2(-1-\sqrt 2)$$ plugging the obtained to $(1)$ we have then $$\frac{\pi^2}{12}+\frac{1}{4}\ln^2(\sqrt 2-1)+\frac{1}{2}\left(\operatorname{Li}_2(\sqrt 2-1)+\operatorname{Li}_2(-\sqrt 2-1)\right)\cdots(2)$$ let $u= \sqrt 2-1 $ and $v=-1-\sqrt 2$ also $uv= -(\sqrt 2-1)(\sqrt 2+1)=-1$.

Using the Abel identity $$\operatorname{Li}_2(u)+\operatorname{Li}_2(v)=\operatorname{Li}_2(uv)+\operatorname{Li}_2\left(\frac{u-uv}{1-uv}\right)+ \operatorname{Li}_2\left(\frac{v-uv}{1-uv}\right)+\ln\left(\frac{1-u}{1-uv}\right)\ln\left(\frac{1-v}{1-uv}\right)$$ plugging the assigned values of $u$ and $v$ we have $$\operatorname {Li}_(\sqrt 2-1)+\operatorname{Li_2}(-1-\sqrt 2)=-\operatorname{Li}_2(-1)+\color{red}{\operatorname{Li}_2\left(\frac{1}{\sqrt 2}\right)+\operatorname{Li}_2\left(-\frac{1}{\sqrt 2}\right)}+\ln\left(\frac{\sqrt 2-1}{\sqrt{2}}\right)\ln\left(\frac{\sqrt{2}+1}{\sqrt 2} \right) =-\frac{\pi^2}{12}+\frac{1}{2}\operatorname{Li}_2\left(\frac{1}{2}\right)-\ln^2(\sqrt {2}-1)+\frac{1}{2}\ln^2(2)=-\frac{\pi^2}{12}+\color{red}{\frac{\pi^2}{24}-\frac{1}{2}\ln^2(2)}-\ln^2(\sqrt 2-1)+\frac{1}{2}\ln^2(2)=-\frac{\pi^2}{24}-\ln^2(\sqrt 2-1)\cdots(2)$$ plugging back to $(2)$ we have $$\frac{\pi^2}{12}+\frac{1}{4}\ln^2(\sqrt 2-1)+\frac{1}{2}\left(-\frac{\pi^2}{24}-\ln^2(\sqrt 2-1)\right)=\frac{\pi^2}{16}-\frac{1}{4}\ln^2\left(\sqrt 2-1\right)$$


We use identity

$$\color{red}{\operatorname{Li}_2(z)+\operatorname{Li}_2(-z)=\frac{1}{2}\operatorname{Li}_2(z^2)}$$ and for $z=\frac{1}{\sqrt 2}$ we have $$\color{red}{\frac{1}{2}\operatorname{Li}_2\left(\frac{1}{2}\right)=\frac{1}{2}\left(\frac{\pi^2}{12}-\ln^2(2)\right)}$$