I have earlier posted this question in Physics StackExchange but I feel that it is more relevant here. The question is about a contour integral and I have written most of the equations needed. Please feel free to ask for any clarification.
I have the thermal partition function and the density of states for the 3D simple harmonic oscillator, which is given below
$$ Z(\beta) = \frac { 1 } { \left( 2 \sinh \left( \frac { \beta \omega } { 2 } \right) \right) ^ { 3 } } $$ and $$ \rho ( E ) = \frac { \left( \frac { E } { \omega } - \frac { 1 } { 2 } \right) \left( \frac { E } { \omega } + \frac { 1 } { 2 } \right) } { 2 \omega } $$
where, $\beta$ is the inverse temperature and $\omega$ is the natural frequency of the SHO.
Now, the partition function can also be written as the following integral
$$ Z(\beta) = \int_{0}^{\infty} dE \: \rho(E) e^{-\beta E} $$
which is a Laplace transform, hence we can calculate the asymptotic of the density of states by inverting this Laplace transform. The inverse Laplace transform can be done using the Bromwich contour integral which is
$$ \rho(E) = \frac{1}{2\pi i} \int_{\gamma - i \infty}^{\gamma + i \infty} d\beta \: Z(\beta) e^{\beta E} $$
where $\gamma$ is greater can the real part of all the singularities of $Z(\beta)$. Now, I tried doing this integral using the residue theorem by closing the contour on the left half of the complex plane. But somehow I am getting the correct density of states using the residue of just one pole, whereas there are infinite number of poles on the imaginary axis due to the periodicity of the hyperbolic sine function (on the imaginary axis).
Can someone explain where I am wrong in this process.
P.S. We also know that $n = \frac{E}{\omega} - \frac{3}{2}$ is a positive integer.