**Hint:**
Separating into real and imaginary components,
$$\tan{\left(\theta+ia\right)}=\frac{\sin{(2\theta)}}{\cos{(2\theta)}+\cosh{(2a)}}+i\frac{\sinh{(2a)}}{\cos{(2\theta)}+\cosh{(2a)}}.$$
Then, integrating over $0\le\theta\le\pi$ we see that the real part of the integral vanishes:
$$\begin{align} \int_{0}^{\pi}\tan{\left(\theta+ia\right)}\,\mathrm{d}\theta &=\int_{0}^{\pi}\frac{\sin{(2\theta)}}{\cos{(2\theta)}+\cosh{(2a)}}\,\mathrm{d}\theta+i\int_{0}^{\pi}\frac{\sinh{(2a)}}{\cos{(2\theta)}+\cosh{(2a)}}\,\mathrm{d}\theta\\\ &=-\frac12\int_{1}^{1}\frac{\mathrm{d}u}{u+\cosh{(2a)}}+i\int_{0}^{\pi}\frac{\sinh{(2a)}}{\cos{(2\theta)}+\cosh{(2a)}}\,\mathrm{d}\theta\\\ &=i\int_{0}^{\pi}\frac{\sinh{(2a)}}{\cos{(2\theta)}+\cosh{(2a)}}\,\mathrm{d}\theta. \end{align}$$
The imaginary integral can be evaluated using the tangent-half-angle substitution.