## Integration of complex expression

Here is an integral:

Integrate[ArcTan[a/(z+r * Cos[x])],{x,0,2 pi}]

Any idea how to compute this integral? I know the result should be:

res=2pi*ArcSin[a/l] where l=1/2 (sqrt((a+r)2 +z^2) *sqrt((a+r)2+z^2)

but I don't know how to get to this result.