I am trying to solve
$$\int\limits_{-\infty}^\infty \frac{1}{e^{x^{2}}+1}dx$$
Process:
First define a contour $\Gamma$ as a semi-circle with radius $R$.
So $$\int_{\Gamma}\frac{1}{e^{x^{2}}+1}dx=\int_{Arc}\frac{1}{e^{x^{2}}+1}dx+\int_{-\infty}^\infty\frac{1}{e^{x^{2}}+1}dx$$
$$\int_{Arc}\frac{1}{e^{x^{2}}+1}dx=\int_{0}^\pi \frac{iRe^{i\theta}}{e^{{Re^{i\theta}}^{2}}+1}d\theta$$ As $R\to\infty$, $\int_{Arc}\to0$.
$$\int_{\Gamma}\frac{1}{e^{x^{2}}+1}dx=\int_{-\infty}^\infty\frac{1}{e^{x^{2}}+1}dx$$
$$\int_{\Gamma}\frac{1}{e^{x^{2}}+1}dx=2\pi i\sum \rm Res$$
$\frac{1}{e^{x^{2}}+1}$ has first order poles at $\sqrt{\pm (2n+1)\pi i}$ so using L'Hopital's the residues become $$-\frac{1}{2\sqrt{\pm (2n+1)\pi i}}$$
So $$\int_{-\infty}^\infty\frac{1}{e^{x^{2}}+1}dx=-\sqrt{\pi i}\sum\frac{1}{\sqrt{\pm (2n+1)}}$$
However, this is where I run into a problem since I get a complex answer whereas the integral should be a real value. If anyone can tell me where I went wrong and the actual value of the integral I would greatly appreciate it.
For any $s$ such that $\text{Re}(s)>1$ we have $\zeta(s)=\sum_{n\geq 1}\frac{1}{n^s} $ and by defining $\eta(s)=\sum_{n\geq 1}\frac{(-1)^{n+1}}{n^s}$ we also have $\eta(s)=\left(1-\frac{2}{2^s}\right)\zeta(s)$. Since the series $\sum_{n\geq 1}\frac{(-1)^{n+1}}{n^s}$ is conditionally convergent as soon as $\text{Re}(s)>0$, we have the following analytic continuation for the $\zeta$ function:
$$ \forall s\in(0,1),\qquad \begin{eqnarray*}\zeta(s)&=&\left(1-\frac{2}{2^s}\right)^{-1}\sum_{n\geq 1}\int_{0}^{+\infty}\frac{(-1)^{n+1}u^{s-1}}{\Gamma(s)}e^{-nu}\,du\\&=&\frac{1}{\Gamma(s)}\left(1-\frac{2}{2^s}\right)^{-1}\int_{0}^{+\infty}\frac{u^{s-1}}{e^u+1}\,du\\&=&\frac{2}{\Gamma(s)}\left(1-\frac{2}{2^s}\right)^{-1}\int_{0}^{+\infty}\frac{x^{2s-1}}{e^{x^2}+1}\,dx\end{eqnarray*} $$ and by evaluating at $s=\frac{1}{2}$ $$ \int_{-\infty}^{+\infty}\frac{dx}{e^{x^2}+1} = \sqrt{\pi}(1-\sqrt{2})\,\zeta\left(\frac{1}{2}\right)=\sqrt{\pi}\sum_{n\geq 1}\frac{(-1)^{n+1}}{\sqrt{n}} $$ where the first equality has already been stated by Sangchul Lee in the comments and the second equality follows from the definition of $\eta(s)$.