We know that from Cauchy-Goursat Theorem that $\int_C e^z dz=0$ where contour $C$ is an unit circle in the anticlockwise direction since $e^z$ is analytic inside and on the contour $C$.
Similarly if we want to find the value of the $\int_F \frac{z}{(9-z^2)(z+i)}dz$ where $F$ is the positively oriented circle $|z|=2$, then take $f(z)=\frac{z}{9-z^2}$. Then by Cauchy integral formula, $\int_F \frac{z}{(9-z^2)(z+i)}dz=\int_F \frac{f(z)}{z-(-i)}dz=2\pi i(\frac{-i}{10})=\frac{\pi}{5}$.
Now my question is: What to do if function $f$ is analytic inside a simple closed contour but $f$ has a singularity on a point of boundary of contour ?
For example, take $f(z)=\frac{1}{z-1}$ and take $C$ as a positively oriented unit circle. Then $f$ is analytic inside $C$ but $f$ has a singularity at $z=1$ which is also a point of a contour $C$. In this case, What is the value of $\int_C f(z)dz$ ?
Much as with real integrals, you must break the path of integration at the singularity and take limits as you approach the singularity.
One way to do this is to alter the path $C$ as follows. Let $D(r)$, $r \in (0,1)$ be the disk of radius $r$ centered at $1$. Let $C(r)$ be the path $C$ with the disk $D(r)$ deleted. This $C(r)$ is no longer a closed path, so the usual elementary complex integral theorems don't apply.
For your example, $f(x) = \frac{1}{x-1}$, and the two endpoints of $C(r)$ are $\frac{1}{2}(2 - r^2 \pm \mathrm{i} r \sqrt{4-r^2})$. So the thing you wish to evaluate is (assuming $\mathrm{Arg}(z) \in [-\pi,\pi)$) $$ \lim_{r \rightarrow 0} \int_{\mathrm{Arg}(2 - r^2 + \mathrm{i} r \sqrt{4-r^2})}^{2\pi + \mathrm{Arg}(2 - r^2 - \mathrm{i} r \sqrt{4-r^2})} \; \frac{1}{\mathrm{e}^{\mathrm{i} \theta}-1} \,\mathrm{d}\theta \text{.} $$ We've replaced $z$ with $\mathrm{e}^{\mathrm{i} \theta}$ so we can use the arguments directly.
This integral has the value $-\mathrm{Arg} \left(-r^2-i \sqrt{4-r^2} r+2\right)+\mathrm{Arg} \left(-r^2+i \sqrt{4-r^2} r+2\right)+2 \cot ^{-1}\left(\frac{r}{\sqrt{4-r^2}}\right)-2 \pi \text{.}$ Taking $r \rightarrow 0$, we get $-\pi$.
More generally, if $f$ is meromorphic (which this $f$ is), we can use the Sokhotski-Plemelj theorem to replace this awful integral with two easier integrals along closed contours and differing only in whether the pole is included or excluded. (The arc $C$ meets the circle that bounds $D(r)$ at two points; these points divide that boundary into two circular arcs. In the one case, we close the path $C(r)$ by including the arc that excludes the pole. For the other integral, we close the path with the other arc, which puts the pole on the interior of the path.) But now the integrals succumb to the usual elementary complex integral theorems. The net result is that if $f$ is meromorphic, any pole inside the contour contributes its full residue to the integral and and pole on the contour contributes half its residue to the (Cauchy principal value of the) integral.