We study the multi-instanton partition functions of the Omega-deformed N = 2* SU(2) gauge theory in the Nekrasov-Shatashvili (NS) limit. They depend on the deformation parameters epsilon(1), the scalar field expectation value a, and the hypermultiplet mass m. At fixed instanton number k, they are rational functions of epsilon(1), a, m and we look for possible regularities that admit a parametrical description in the number of instantons. In each instanton sector, the contribution to the deformed Nekrasov prepotential has poles for large deformation parameters. To clarify the properties of these singularities we exploit Bethe/gauge correspondence and examine the special ratios m/epsilon(1) at which the associated spectral problem is n-gap. At these special points we illustrate several structural simplifications occurring in the partition functions. After discussing various tools to compute the prepotential, we analyze the non-perturbative corrections up to k = 24 instantons and present various closed expressions for the coefficients of the singular terms. Both the regular and singular parts of the prepotential are resummed over all instantons and compared successfully with the exact prediction from the spectral theory of the Lame equation, showing that the pole singularities are an artifact of the instanton expansion. The analysis is fully worked out in the 1-gap case, but the final pole cancellation is proved for a generic ratio m/epsilon(1) relating it to the gap width of the Lame equation.