This analogy, this passage from the finite to infinite, is beset with pitfalls. How did Euler avoid them? He was a genius, some people will answer, and of course that is no explanation at all. Euler has shrewd reasons for trusting his discovery. We can understand his reasons with a little common sense, without any miraculous insight specific to genius.
G. Polya, Mathematics and Plausible Reasoning Vol. 1
G. Polya, Mathematics and Plausible Reasoning Vol. 1
See also the appendix “Mathematical Formalities And Style” in Probability Theory by E.T. Jaynes.