Computation on integrals over the unit circle with nearby poles