If $z=\mathrm e^{\mathrm it}$, $z\ne1$, then $\cos t=\frac12(z+z^{-1})$ hence $1/(1-\cos t)=-2z/(1-z)^2$. The sum $s_n$ to be computed is
$$
s_n=\sum_z^*\frac{-2z}{(1-z)^2},
$$
where $\sum\limits^*_z$ means that the sum runs over every $n$th root $z$ of $1$ different from $1$. For every $|x|\lt1$, consider
$$
t_n(x)=\sum_z\frac{zx}{(1-zx)^2},
$$
where $\sum\limits_z$ means that the sum runs over every $n$th root $z$ of $1$. Expanding each ratio $zx/(1-zx)^2$ as a power series in $(zx)$, one gets
$$
t_n(x)=\sum_{k\geqslant1}ku_k^nx^k,\qquad u_k^n=\sum_zz^k.
$$
Now, $u_k^n=0$ for every $k$ except when $k$ is a multiple of $n$, in which case $u_k^n=n$. Thus,
$$
t_n(x)=n^2\sum_{k\geqslant1}kx^{nk}=\frac{n^2x^n}{(1-x^n)^2}.
$$
This allows to compute $s_n$ since
$$
s_n=2\cdot\lim_{x\to1}\left(\frac{x}{(1-x)^2}-t_n(x)\right).
$$
Expanding both terms in the limit in powers of $1-x$ when $x\to1$ yields finally
$$
s_n=2\cdot\frac{n^2-1}{12}=\frac{n^2-1}6.
$$