We make the following lemma:
Lemma. Suppose $f(z)$ is holomorphic near $z = z_0$. Fix $\theta_0 \in (0, 2\pi)$. If $\gamma_\varepsilon$ denotes a counter-clockwise oriented arc of angle $\theta_0$ on the circle of radius $\varepsilon$ centered at $z_0$, then
$$ \lim_{\varepsilon\to0} \int_{\gamma_\varepsilon} \frac{f(\zeta)}{\zeta-z_0}\;d\zeta=i\theta_0 f(z_0).$$
Proof. By the substitution $\zeta = z_0 + \varepsilon e^{i\theta}$, we have
$$\begin{align*}
\left| \int_{\gamma_\varepsilon} \frac{f(\zeta)}{\zeta-z_0}\;d\zeta - i\theta_0 f(z_0)\right|
&= \left| i \int_{\theta_1}^{\theta_1+\theta_0} f(z_0 + \varepsilon e^{i\theta})\;d\theta - i\theta_0 f(z_0)\right| \\
& \leq \int_{\theta_1}^{\theta_1+\theta_0} \left| f(z_0 + \varepsilon e^{i\theta}) - f(z_0) \right| \;d\theta,
\end{align*}$$
which clearly goes to zero when $\varepsilon \to 0$.
As a corollary, if $f(z)$ has a simple pole at $z = z_0$ then with the same notation as in the Lemma, we have
$$ \lim_{\varepsilon\to0} \int_{\gamma_\varepsilon} f(\zeta) \;d\zeta=i\theta_0 \operatorname{Res} \{ f(z), z_0 \}.$$
Now let $C$ be the upper-semicircular contour of radius $R \gg 1$ with a small semicircular indent of radius $\varepsilon \ll 1$ at the origin. Let us write $C$ as
$$ C = \Gamma_{R} + L_{\varepsilon,R} - \gamma_\varepsilon,$$
where $\Gamma_R$ and $\gamma_\varepsilon$ denote counter-clockwise oriented arcs corresponding to the outer circle and the inner circle of $C$, respectively, and $L_{\varepsilon,R}$ denote the remaining union of two lines on $C \cap \Bbb{R}$. Now for
$$ f(z) = \frac{e^{2\pi i z}}{z(z^2 + 3)}, $$
the integral in question, which we denote as $I$, is equal to
$$I = \frac{1}{2i} \lim_{{\varepsilon \to 0 \atop R \to \infty}} \int_{L_{\varepsilon, R}} f(z) \; dz.$$
Now, by Cauchy integration formula,
$$ \oint_{C} f(z) \; dz = 2\pi i \operatorname{Res} \{ f(z), i\sqrt{3} \}. $$
This means that
$$ \int_{L_{\varepsilon, R}} f(z) \; dz = 2\pi i \operatorname{Res} \{ f(z), i\sqrt{3} \} + \int_{\gamma_\varepsilon} f(z) \; dz - \int_{\Gamma_R} f(z) \; dz. $$
Taking limit $\varepsilon \to 0$ and $R \to \infty$, the integral $\int_{\Gamma_R} f(z) \; dz$ vanishes by Jordan's lemma. Thus by our lemma,
$$ \lim_{{var\epsilon \to 0 \atop R \to \infty}} \int_{L_{\varepsilon, R}} f(z) \; dz = 2\pi i \operatorname{Res} \{ f(z), i\sqrt{3} \} + \pi i \operatorname{Res} \{ f(z), 0 \}.$$
But since
$$ \operatorname{Res} \{ f(z), i\sqrt{3} \} = \left. (z-i\sqrt{3})f(z) \right|_{z=i\sqrt{3}} = -\frac{1}{6}e^{-2\pi \sqrt{3}} $$
and
$$ \operatorname{Res} \{ f(z), 0 \} = \left. z f(z) \right|_{z=0} = \frac{1}{3}, $$
we have
$$ I = \frac{1}{2i} \left[ 2\pi i \left(-\frac{1}{6}e^{-2\pi \sqrt{3}}\right) + \pi i \left(\frac{1}{3} \right) \right] = \frac{\pi}{6}\left(1 - e^{-2\pi \sqrt{3}} \right). $$