We can obtain power series in $a$ by expanding in geometric series. Since the specific treatment depends on the integration region, let's introduce lower and upper limits, $y_0 <y$,
$$
I = \int_{y_0 }^{y} dx\, \frac{\exp \left[ -x -\frac{1}{2} \left( \frac{x-\mu }{\sigma } \right)^{2} \right] }{1+a\exp (-x)}
$$
For $|a|<e^{y_0 } $, we have $|a\exp (-x)| < 1$ and we can expand in a geometric series as
\begin{eqnarray*}
I &=& \sum_{n=0}^{\infty } (-a)^n \int_{y_0 }^{y} dx\, \exp \left[ -(n+1) x -\frac{1}{2} \left( \frac{x-\mu }{\sigma } \right)^{2} \right] \\
&=& \sum_{n=0}^{\infty } (-a)^n \sqrt{\frac{\pi }{2} } \sigma \ e^{((n+1) \sigma^{2} -2\mu)(n+1)/2} \cdot \\
& & \hspace{2.5cm} \left[ \mbox{erf} \left( \frac{(n+1)\sigma^{2} -\mu +y}{\sqrt{2} \sigma }\right) - \mbox{erf} \left( \frac{(n+1)\sigma^{2} -\mu +y_0 }{\sqrt{2} \sigma }\right) \right]
\end{eqnarray*}
On the other hand, for $|a|>e^y $, we have $|\exp (x) /a| <1$, and we can alternatively write and expand
\begin{eqnarray*}
I &=& \frac{1}{a} \int_{y_0 }^{y} dx\, \frac{\exp \left[-\frac{1}{2} \left( \frac{x-\mu }{\sigma } \right)^{2} \right] }{1+\exp (x)/a} \\
&=& \frac{1}{a} \sum_{n=0}^{\infty } \left(-\frac{1}{a} \right)^{n} \int_{y_0 }^{y} dx\, \exp \left[ nx -\frac{1}{2} \left( \frac{x-\mu }{\sigma } \right)^{2} \right] \\
&=& \sum_{n=0}^{\infty } \left(-\frac{1}{a} \right)^{n+1} \sqrt{\frac{\pi }{2} } \sigma \ e^{(n \sigma^{2} +2\mu)n/2} \cdot \\
& & \hspace{2.5cm} \left[ \mbox{erf} \left( \frac{n\sigma^{2} +\mu -y}{\sqrt{2} \sigma }\right) - \mbox{erf} \left( \frac{n\sigma^{2} +\mu -y_0 }{\sqrt{2} \sigma }\right) \right]
\end{eqnarray*}
Finally, for $|a|\in \ ]e^{y_0 } ,e^y [$, we can separate into two integration intervals, $[y_0,\ln |a|\, [$ and $]\, \ln |a|,y]$, and use the applicable expansion from above in each case to obtain the combined result. In the case of negative $a$, one will have to specify how the boundary at $\ln |a|$ is approached from either side, corresponding to the pole in the original integrand; for example, one might specify a principal value prescription.
@LiorSilberman: I need the indefinite integral, but $x$ is a real number.
– dancer Apr 01 '21 at 22:25