Suppose we had a function defined as $$ S(\zeta) = \zeta - \sqrt{\zeta^2 - c^2} $$
and we wish to evaluate $$ \oint_\gamma \frac{S(\zeta)}{z-\zeta}\, d\zeta, $$ where $\gamma$ is the (positively orientated) ellipse $$ \frac{x^2}{a^2}+\frac{y^2}{b^2} = 1, \quad a > b > 0,\quad c^2= a^2-b^2 $$ and $z$ lies outside $\gamma$. First I notice that by Cauchy's theorem, $$ \oint_\gamma \frac{\zeta}{z-\zeta}\, d\zeta = 0 $$ since the integrand is holomorphic inside $\gamma$. So I am left with $$ -\oint_\gamma \frac{ \sqrt{\zeta^2 - c^2}}{z-\zeta}\, d\zeta $$ Is there a clever way to evaluate this without using a parameterisation? Letting $$ \zeta = a \cos t + ib\sin t, \quad 0 \leq t \leq 2\pi $$ leads me to $$ -\oint_\gamma \frac{ \sqrt{\zeta^2 - c^2}}{z-\zeta}\, d\zeta = \int_0^{2\pi} \frac{(b\cos t + ia\sin t)^2}{iz-ia\cos t + b\sin t} \, dt $$ which looks hard to evaluate.
First observe the the branch points corresponds to the two foci of the ellipse that constitutes your path of integration,therefore the branch cut is inside $\gamma$ . Now we do a little trick, instead of picking up the singularities inside of our contour, we pick up the ones at its outside (because it is easier to count residues then integrating around a branch cut). This yields
$$ I(z)=\oint_{\gamma}\frac{S(\zeta)}{z-\zeta}d\zeta=-2\pi i(\text{Res}(\zeta=\infty)+\text{Res}(\zeta=z)) $$
Note the minus sign, which stemms from the fact the we encircle the poles in clockwise direction now. The residues are given (choosing the correct branch of $\log$ which induces that $\pm i=e^{\pm i \pi/2}$)
$$ \text{Res}(\zeta=\infty)=0\\ \text{Res}(\zeta=z)=z-\sqrt{z^2-c^2} $$
and therefore