I am using Riemann's Zeta Function by H.M. Edwards as a reference for the derivation of the functional equation of the Riemann Zeta Function, as well as this pdf. I am not very familiar with the nuances of analytic continuation, but I have taken introductory complex analysis so far. Consider:
$$f(z)=\frac{(-x)^{s}}{e^x-1}\frac{dz}{z} \tag{1}$$
Where $s=\sigma+i\tau$. Using part of a keyhole contour defined as $\gamma_1(t)=te^{i\delta}$ where $R\leq t \leq \epsilon$, $\gamma_2(t)=\epsilon e^{i\theta}$ where $\delta\leq \theta \leq 2\pi-\delta$, and $\gamma_3(t)=te^{-i\delta}$ where $\epsilon \leq t \leq R$. We want to integrate over $C=\gamma_1\sqcup\gamma_2\sqcup\gamma_3$ (in an opposite direction relative to how keyhole contours are done normally), and taking the limit as $\epsilon \to 0$ and $R \to \infty$. For the portion $\gamma_2$, it is important to note that it converges to 0 only if $Re(s)= \sigma >1$ since: $$\Biggl| \int_{\delta}^{2\pi-\delta}\frac{e^{sLog(-\epsilon e^{i\theta})}}{e^{\epsilon e^{i \theta}}-1}idt\Biggl| \leq \int_{\delta}^{2\pi-\delta} \bigg|\frac{\epsilon^{\sigma-1}*e^{\tau\pi}}{1+\frac{\epsilon}{2!} + \frac{\epsilon^2}{3!}+...}\bigg|d\theta \tag{2}$$ After performing the integration and taking limits we obtain: $$\int_C \frac{(-x)^{s-1}}{e^x-1}\frac{dz}{z}=2i\sin(\pi s)\Gamma(s)\zeta(s) \tag{3}$$ Which can be rewritten using the Gamma reflection property to obtain: $$\zeta(s)=\frac{\Gamma(1-s)}{2 \pi i} \int_C \frac{(-x)^{s-1}}{e^x-1}\frac{dz}{z} \tag{4}$$ Edwards says that $(3)$ is infact convergent for all $s\neq 1$, but I am not sure how he comes to that conclusion since $(2)$ shows that $\sigma>1$ must be true in order to verify convergence. Ignoring that we can then close the contour with the circle $\gamma_4(t)=Re^{i-\theta}$ where $2\pi-\delta \geq \theta \geq \delta$. The integral over this circle converges to 0 provided $Re(s)<0$ (This detail is bought up in the pdf above) which I am confused by since we wanted $\sigma>1$ earlier. Ignoring that we can then apply residue theorem where the function has poles at $z=2\pi ik$ where $k \in \mathbb{Z},k \neq 0$. We must multiply one side of the equation by negative 1 since the contour C must be positively oriented. We then get: $$\zeta(s)=\Gamma(1-s)\sum_{\substack{k\in \mathbb{Z} \\ k\neq 0}}-Res(f(z),2\pi ik)$$ Now for arbitrary k: $$-Res(f(z),2\pi ik)=(-2\pi i n)^{s-1}$$ Using some algebra and the identity for the complex sin function we get: $$\zeta(s)=2^s \pi^{s-1} \sin(\frac{\pi s}{2})\Gamma(1-s)\sum_{n=1}^{\infty}n^{s-1}$$ The algebra that I have omitted is explained in the book. Obtaining the final functional equation involves asserting that: $$\zeta(1-s)=\sum_{n=1}^{\infty}n^{s-1}$$ Though I am not sure why this assertion is valid since the sum would be divergent, though it does give the correct answer.
I am not sure how to reason out why this derivation works given that there are multiple conditions on what $Re(s)$ must be for certain parts of the derrivation. $Re(s)>1$ must be true for $(2)$ to converge to 0. But, integral around $\gamma_4$ must have $Re(s)<0$ in order to converge to 0. But Edwards says that $(3)$ Is valid for all $s$ which doesn't seem to be true because of $(2)$. Why are we allowed to say that $\zeta(1-s)=\sum_{n=1}^{\infty}n^{s-1}$ if the sum is clearly divergent? And how do we get the final conclusion that the formula is valid for all $s\neq 1$? Thank you.