I've been trying to solve this for a couple of days now,
$U$ is an open set containing $[-1,1]$ and $O$ is the set $U\backslash [-1,1]$. Let $\alpha_\varepsilon = (1+\varepsilon)\cos(t)+i\varepsilon\sin(t)$ for $0 \leq t \leq 2\pi$. Then the trace of $\alpha_\varepsilon \subseteq O$ for $\varepsilon$ small enough (say $\varepsilon<\varepsilon_0$). If $g$ is a function which is holomorphic on $O$ and continuous on $U$. Show that $$\int_{\alpha_\varepsilon} g(\zeta)d\zeta=0.$$
The hint I got was to use "cancellation" and the fact that $g$ is continuous on an open set containing the interval.
We have a homotopy theorem about every path integral is zero when the path is homotopic to a point and another cluster of statements which culminate in evaluating $\int_\gamma f(z)dz = \sum \text{ind}_\gamma(a_j)\int_{\Gamma_j}f(z)dz$. Neither of which will work because $O$ isn't simply connected and I can't construct a cycle which is homologous to zero.
I tried explicitly constructing an anti-derivative for $g$ but don't have any information on $g$ at all really so I don't think I can show that the integral of g over any path in $O$ depends only on the endpoints.
Any recommendations?
A more complete version of the hint you were given: The homotopy version of Cauchy's Theorem shows that the integral is independent of $\epsilon$. So it's enough to show that the limit of the integral as $\epsilon$ tends to $)$ is $0$.
And you can show that by "cancellation". It's an "epsilon-delta" argument; we can't use "$\epsilon$" because that letter's already in use, so I'm going to use $s$ instead: Fix $A>1$ such that $[-A,a]\subset O$. If $s>0$ there exists $\delta>0$ such that if $0<y<\delta$ then $$|g(x+iy)-g(x-iy)|<s\quad(x\in[-A,A]).$$
Note that the "upper half" of $\alpha_\epsilon$ is the same as the conjugate of the lower half, except that the direction is reversed...
Final Hint: Fix $y>0$. Define $\gamma_1,\gamma_2:[0,1]\to\Bbb C$ by $\gamma_1(t)=t-iy$, $\gamma_2(t)=(1-t)+iy$. Then $$\int_{\gamma_1}g(z)\,dz+\int_{\gamma_2}g(z)\,dz=\int_0^1(g(t-iy)-g(t+iy))\,dt.$$Something analogous happens if you split your curve $\alpha_\epsilon$ into the part iwth positive imaginary part plus the part with negative imaginary part...