Solution (source code)

= Solution

Choose $\sqrt{z^2-1}\sim z$ at infinity. On $-1\lt x\lt 1$ its upper/lower values are $\pm i\sqrt{1-x^2}$, divided by $x+c$. Under $z=1/\zeta$ the transformed integrand is the stated $g$; inversion reverses orientation, maps the slit exterior/interior accordingly, and encloses $0,-1/c$ negatively. Their residues give $J=-2\pi i(c-\sqrt{c^2-1})$. Comparing the two slit banks gives $J=-2iI$, hence $I=\pi(c-\sqrt{c^2-1})$.