I am trying to find the elapsed time $T$ (or transit time) over one cycle of the harmonic oscillator
$$\ddot{x} + \omega^2x=0.$$
I worked this out to be \begin{align} T &= \int_{R}^{-R} \frac{\mathrm{d}x}{-y} + \int_{-R}^{R} \frac{\mathrm{d}x}{y}\\ &= \int_{R}^{-R} \frac{\mathrm{d}x}{-\sqrt{R^2-\omega^2x^2}} + \int_{-R}^{R} \frac{\mathrm{d}x}{\sqrt{R^2-\omega^2x^2}}\\ &= -\frac{1}{\omega} \int_{R}^{-R} \frac{\mathrm{d}x}{\sqrt{D^2-x^2}} + \frac{1}{\omega} \int_{-R}^{R} \frac{\mathrm{d}x}{\sqrt{D^2-x^2}} \end{align}
where $D=R/\omega$.
When I evaluate the definite integral, I get $T=4\arcsin(\omega)/\omega $, which makes no sense to me because $\arcsin(\omega)$ bounds $\omega$ at unity. Since $\omega$ is the angular frequency, the answer should be $T=2\pi/\omega$.
Could someone point out where I went so wrong?
Your setup is entirely correct, but your evaluation of the integral is not. The primitive of $\frac{1}{\sqrt{D^2 -x^2}}$ is $\text{arctan} \frac{x}{\sqrt{D^2 -x^2}}$; taking the appropriate limits yields the desired factor $\pi$, for each integral.
Edit: As @MichaelSeifert rightly pointed out, the integral can also be expressed in terms of $\text{arcsin}$, since \begin{equation} \text{arctan} \frac{x}{\sqrt{D^2 -x^2}} = \text{arcsin} \frac{x}{D}. \end{equation} As $\text{arcsin} 1 = \frac{\pi}{2}$, you get the requested answer.