I am interested in the following integral \begin{align} \int \frac{dt}{t\sqrt{(t-e_1)(t-e_2)(t-e_3)}} \end{align} where $e_1=\bar{e}_3$ and $e_2\in\mathbb{R}$ is negativ. Assume that the branch cut of the square root goes to minus infinity. Also assume that the real part of $e_1$, and hence of $e_3$, is greater than zero. I want to perform the integration along the straight vertical path from $e_1$ to $e_3$ and rewrite it in terms of elliptic integrals of first, second or third kind. A suitable reference is of course the book Handbook of elliptic functions by Byrd, Friedman and on page 89 they the consider this integral by integrating along the real line. For example, integrating from $e_2$ to minus infinity the integral takes a particular easy form (see page 94, eq. 245.06 and page 216, eq. 361.60 with $f_1=0$).
I feel like the form for integrating from $e_1$ to $e_3$ should be similar since we are still integrating between the branch points. Maybe someone can help me or post a reference for similar problems?
Edit: The case I mentioned above is \begin{align} \int_{-\infty}^{e_2}\frac{dt}{t\sqrt{(t-e_1)(t-e_2)(t-e_3)}}=c\int_{0}^{u_1}\frac{1-cnu}{1+\alpha\, cn u} \end{align} for some constants $c,\alpha$ depending on the $e_i$ and $cn u_1=-1$. The right hand side can be simplified to \begin{align} \frac{1}{\alpha}(-2K(m)+\frac{2}{1-\alpha}\Pi(\frac{\alpha^2}{\alpha^2-1},m)) \end{align} where $K$ and $\Pi$ are the complete elliptic integrals of the first and third kind, respectively.
Edit2: I kind of found the solution by myself but this will probably not work in the general case because I have some additional information. Nevertheless, maybe the edit will help someone else. The following calculation should be right modulo signs.
Assume that the imaginary part of $e_1$ is greater than zero (which is no restriction since we can just exchange $e_1$ and $e_3$). The additional information I have is that I know the imaginary part of the integral \begin{align*} \int_{e_1}^{e_2}\frac{dt}{t\sqrt{(t-e_1)(t-e_2)(t-e_3)}}. \end{align*} Denote the imaginary part of this integral by $v$. Since $\int_{e_1}^{e_3}$ is completely imaginary and $\int_{e_1}^{e_3}+\int_{e_3}^{\infty}+\int_{\infty}^{e_1}=0$ by the residue theorem we get $\textrm{Im}\int_{e_1}^{\infty}=\frac{1}{2}\textrm{Im}\int_{e_1}^{e_3}$. On the other hand $\int_{e_1}^{e_2}+\int_{e_2}^{e_3}+\int_{e_3}^{e_1}=2\pi i$ and hence $\int_{e_3}^{e_1}=2\pi i - 2 i v$ (as the imaginary part of $\int_{e_1}^{e_2}$ and $\int_{e_2}^{e_3}$ are the same). Therefore \begin{align*} \textrm{Im}\int_{e_1}^{\infty}=\pi - v. \end{align*} By holomorphicity $\int_{e_1}^{e_2}=\int_{e_1}^{-\infty}+\int_{-\infty}^{e_2}$ (above the branch cut). However, we also have $\textrm{Im}\int_{e_1}^{\infty}=\textrm{Im}\int_{e_1}^{-\infty}$ we and hence \begin{align*} \textrm{Im}\int_{e_1}^{\infty}=v-\textrm{Im}\int_{e_2}^{-\infty}. \end{align*} The integral $\int_{e_2}^{-\infty}$ is purely imaginary. Putting these equations together we can express the integral $\int_{e_1}^{e_3}$ in terms of some constants and the formula for $\int_{e_2}^{-\infty}$ in my first edit. Again, I did not take care of the signs in the integrations at all so be careful there.
Remark: For the general case I tried to identify $\wp=x$ and then use the relations of Weierstrass elliptic functions for rhombic tori, i.e. $\wp(z)=e_2+H_2\frac{1+cn(z';m)}{1-cn(z';m)}$ (see Abramowitz/Stegun p. 649 for the notation). We can integrate the Jacobi ellitpic functions (eq. 361.60 from Handbook of ellitpic functions) and for the elliptic integral of the third kind I tried using the identities of the book Elliptic functions and applications, Lawden on page 76. But unfortunately I did not succed and mathematica always gave me wrong results.