Complex Integral - exponential divided by a monomial How does one solve integrals like this-
$$I=\int^\beta_0 dx \frac{\exp(i\omega_nx)}{x-a}$$ where $\omega_n=\frac{\pi n}{\beta} $.  
EDIT: $\beta$ is a finite, real number. I am looking for a principal value integral. Any help with choosing a good contour would be awesome!
(thanks to @Santosh Linkha for suggestions on improving the question)
 A: $\newcommand{\+}{^{\dagger}}
 \newcommand{\angles}[1]{\left\langle\, #1 \,\right\rangle}
 \newcommand{\braces}[1]{\left\lbrace\, #1 \,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\, #1 \,\right\rbrack}
 \newcommand{\ceil}[1]{\,\left\lceil\, #1 \,\right\rceil\,}
 \newcommand{\dd}{{\rm d}}
 \newcommand{\down}{\downarrow}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,{\rm e}^{#1}\,}
 \newcommand{\fermi}{\,{\rm f}}
 \newcommand{\floor}[1]{\,\left\lfloor #1 \right\rfloor\,}
 \newcommand{\half}{{1 \over 2}}
 \newcommand{\ic}{{\rm i}}
 \newcommand{\iff}{\Longleftrightarrow}
 \newcommand{\imp}{\Longrightarrow}
 \newcommand{\isdiv}{\,\left.\right\vert\,}
 \newcommand{\ket}[1]{\left\vert #1\right\rangle}
 \newcommand{\ol}[1]{\overline{#1}}
 \newcommand{\pars}[1]{\left(\, #1 \,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\pp}{{\cal P}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\vphantom{\large A}\,#2\,}\,}
 \newcommand{\sech}{\,{\rm sech}}
 \newcommand{\sgn}{\,{\rm sgn}}
 \newcommand{\totald}[3][]{\frac{{\rm d}^{#1} #2}{{\rm d} #3^{#1}}}
 \newcommand{\ul}[1]{\underline{#1}}
 \newcommand{\verts}[1]{\left\vert\, #1 \,\right\vert}
 \newcommand{\wt}[1]{\widetilde{#1}}$
$\ds{\omega_{n} \equiv {\pi n \over \beta}\,,\quad n\in{\mathbb Z}\,,
     \quad\beta > 0}$.

With
  $\ds{t \equiv -\ic\omega_{n}x\quad\imp\quad
     x = {\ic \over \omega_{n}}\,t}$:
  \begin{align}
I&\equiv\int_{0}^{\beta}{\exp\pars{\ic\omega_{n}x} \over x-a}\,\dd x
=\int_{0}^{-n\pi\ic}{\expo{-t} \over \pars{\ic/\omega_{n}}t - a}\,
{\ic \over \omega_{n}}\,\dd t
=\int_{0}^{-n\pi\ic}{\expo{-t} \over t + a\omega_{n}\ic}\,\dd t
\\[3mm]&=\expo{a\omega_{n}\ic}
\int_{a\omega_{n}\ic}^{-n\pi\ic + a\omega_{n}\ic}{\expo{-t} \over t}\,\dd t
=\expo{a\omega_{n}\ic}\bracks{%
-\int_{\pars{a/\beta - 1}n\pi\ic}^{\infty}{\expo{-t} \over t}\,\dd t
+\int_{\pars{a/\beta}n\pi\ic}^{\infty}{\expo{-t} \over t}\,\dd t}
\end{align}

Those integrals are related to the
Exponential Integral
$\ds{{\rm E_{1}}\pars{z}}$. Indeed, it leads to a serie of Exponential integrals since, by definition, it requires $\ds{\verts{{\rm Arg}\pars{z}} < \pi}$. Moreover, you should study carefully the influence of parameter $\ds{a}$.
Can you take it from here ?.
