For $x=\frac{(2n+1)\pi}2,n\in\mathbb Z$, it is easy to see that
$$\sum_{n=0}^\infty(-1)^n\cos((2n+1)x)=0$$
Since every term is zero. However, if $x\ne\frac{(2n+1)\pi}2,n\in\mathbb Z$, then it suffices to prove that
$$\lim_{n\to\infty}\cos((2n+1)x)\ne0$$
Or,
$$\limsup_{n\to\infty}\cos((2n+1)x)=1$$
Hence, it diverges.
If one wishes to regularize this series to a finite values, then one may apply an Abel sum:
$$\begin{align}\operatorname{Abel}(S_x)&=\lim_{t\to-1^+}\sum_{n=0}^\infty t^n\cos((2n+1)x)\\&=\Re\left[\lim_{t\to-1^+}\sum_{n=0}^\infty t^ne^{(2n+1)ix}\right]\\&=\Re\left[\lim_{t\to-1^+}\frac{e^{ix}}{1-te^{2ix}}\right]\\&=\Re\left[\frac{e^{ix}}{1+e^{2ix}}\right]\\&=\frac12\sec(x)\end{align}$$