My goal with this answer is to give you a bunch of different really general integral formulas that you may find very useful.
$$F(a)=\int_0^{\pi}\frac{\mathrm dx}{(1+a\cos x)^2}$$
So your integral is $2F(-a)$. First off we will preform the tangent-half-angle substitution $t=\tan(x/2)$. Hence we have that
$$F(a)=2\int_0^\infty \frac1{(1+a\frac{1-t^2}{1+t^2})^2}\frac{\mathrm dt}{1+t^2}$$
$$F(a)=2\int_0^{\infty}\frac{1+t^2}{[(1-a)t^2+a+1]^2}\mathrm dt$$
Which we can rewrite as
$$F(a)=\frac2{1-a}\int_0^\infty\frac{\mathrm dt}{(1-a)t^2+a+1}+\frac{4a}{a-1}\int_0^{\infty}\frac{\mathrm dt}{[(1-a)t^2+a+1]^2}$$
Next we consider the very general integral
$$I(m;a,b)=\int_0^\infty \frac{\mathrm dx}{(ax^2+b)^{m+1}}$$
First we integrate by parts with $\mathrm dv=\mathrm dx$ to produce
$$I(m;a,b)=\frac{x}{(ax^2+b)^{m+1}}\bigg|_0^{\infty}+2(m+1)\int_0^\infty\frac{ax^2}{(ax^2+b)^{m+2}}\mathrm dx$$
$$I(m;a,b)=2(m+1)\int_0^\infty\frac{ax^2+b-b}{(ax^2+b)^{m+2}}\mathrm dx$$
$$I(m;a,b)=2(m+1)I(m;a,b)-2(m+1)bI(m+1;a,b)$$
Then solving for $I(m+1;a,b)$ and replacing $m+1$ with $m$,
$$I(m;a,b)=\frac{2m-1}{2bm}I(m-1;a,b)$$
And for the base case:
$$I(0;a,b)=\int_0^{\infty}\frac{\mathrm dx}{ax^2+b}$$
The Trig sub $x=\sqrt{\frac{b}a}\tan u$ gives
$$I(0;a,b)=\frac\pi{2\sqrt{ab}}$$
Which is a special case of
$$\int_{x_1}^{x_2}\frac{\mathrm dx}{ax^2+bx+c}=\frac2{\sqrt{4ac-b^2}}\arctan\frac{2ax+b}{\sqrt{4ac-b^2}}\bigg|_{x_1}^{x_2}$$
Anyway, the recurrence has the solution
$$I(m;a,b)=\frac\pi{2^{2m+1}b^m\sqrt{ab}}{2m\choose m}$$
Which we will apply very shortly!
Recalling the definition of $I(m;a,b)$, we have that
$$F(a)=\frac2{1-a}I(0;1-a,1+a)+\frac{4a}{a-1}I(1;1-a,1+a)$$
$$F(a)=\frac\pi{(1-a^2)^{3/2}}$$
And since your integral is given by $2F(-a)$,
$$\int_0^{2\pi}\frac{\mathrm dx}{(1-a\cos x)^2}=\frac{2\pi}{(1-a^2)^{3/2}}$$
ADDENDUM
Consider the integral
$$C(n;a)=\int_0^\pi \frac{\mathrm dx}{(1+a\cos x)^n}$$
Starting with $t=\tan\frac{x}2$,
$$C(n;a)=2\int_0^\infty \frac1{\left[1+a\frac{1-t^2}{1+t^2}\right]^n}\frac{\mathrm dt}{1+t^2}$$
$$C(n;a)=2\int_0^\infty \frac{\left(t^2+1\right)^{n-1}}{\left[(1-a)t^2+1+a\right]^n}\mathrm dt$$
Then using the binomial theorem,
$$C(n;a)=2\sum_{k=0}^{n-1}{n-1\choose k}\int_0^\infty\frac{x^{2k}}{\left[(1-a)x^2+1+a\right]^n}\mathrm dx$$
$$C(n;a)=\frac2{(1-a)^n}\sum_{k=0}^{n-1}{n-1\choose k}\int_0^\infty\frac{x^{2k}}{\left[x^2+\frac{1+a}{1-a}\right]^n}\mathrm dx$$
We then recall the integral due to my collaborator @DavidG,
$$\int_0^\infty\frac{x^{q}}{\left[x^w+b\right]^p}\mathrm dx=\frac{b^{\frac{1+q}{w}-p}}{w}\frac{\Gamma\left(p-\frac{1+q}{w}\right)\Gamma\left(\frac{1+q}{w}\right)}{\Gamma\left(p\right)}$$
Here $\Gamma(s)$ is the Gamma function. So with $w=2$, $b=\frac{1+a}{1-a}$, $p=n$, and $q=2k$,
$$C(n;a)=\frac1{(1-a)^n}\sum_{k=0}^{n-1}{n-1\choose k}\left(\frac{1+a}{1-a}\right)^{\frac{2k+1}{2}-n}\frac{\Gamma\left(n-\frac{2k+1}{2}\right)\Gamma\left(\frac{2k+1}{2}\right)}{\Gamma\left(n\right)}$$
$$C(n;a)=\frac1{(1-a)^n}\sum_{k=0}^{n-1}\left(\frac{1+a}{1-a}\right)^{\frac{2k+1}{2}-n}\frac{\Gamma\left(n-\frac{2k+1}{2}\right)\Gamma\left(\frac{2k+1}{2}\right)}{k!\Gamma(n-k)}$$