Find $S_1(x)$: $$ S_1(x)=\sum_{k=1}^\infty \frac{\cos 2kx}{k^2} $$
My attempt: $$ \begin{aligned} &\text{Let } S_2=\sum_{k=1}^\infty \frac{\sin 2kx}{k^2}\\ &S_1+i\cdot S_2=\sum_{k=1}^\infty\frac{(\cos x+i\sin x)^{2k}}{k^2}=[z=\cos x+i\sin x]=\\ &=\sum_{k=1}^\infty\frac{z^{2k}}{k^2}=S\\ &\left(\frac{z^{2k}}{k^2}\right)'_z=\frac{2z^{2k-1}}{k}\\ &\sum_{k=1}^\infty\frac{2z^{2k-1}}{k}=\frac{2}{z}\sum_{k=1}^\infty \frac{(z^2)^k}{k}=-\frac{2\ln(1-z^2)}{z}=T\ \ \ \ \ \ (|z|<1) \end{aligned} $$ Then I tried to integrate $T$ (from $0$ to $z$) in order to get sum $S$. But this integral seems to get me back to the polylogarithm I was trying to avoid. So, I don't see how I can write $S_1$ with the finite number of terms (without the polylogarithm function).

You were on the right track. Let $S(x)$ be given by the series $S(x)=\sum_{k=1}^\infty \frac{\cos(2kx)}{k^2}$. Then, we see that for $x\in(0,\pi)$
$$\begin{align} S(x)&=\sum_{k=1}^\infty \frac{\cos(2kx)}{k^2}\\\\ &=\text{Re}\left(\sum_{k=1}^\infty \frac{e^{i2kx}}{k^2}\right)\\\\ &=\text{Re}\left(\text{Li}_2(e^{i2x})\right)\\\\ &=\frac12 \left(\text{Li}_2(e^{i2x})+\text{Li}_2(e^{-i2x})\right)\\\\ &=\frac12\left(-\frac{\pi^2}6-\frac12\log^2(-e^{i2x})\right)\\\\ &=-\frac{\pi^2}{12}+\frac14\left(2x-\pi\right)^2\\\\ &=\frac{\pi^2}{6}+x^2-\pi x \end{align}$$
And we are done!