Euclid manages to obtain a rigorous proof without ever dealing with infinity, by reducing the problem [of the infinitude of primes] to the study of finite numbers. This is exactly what contemporary mathematical analysis does.
"The Forgotten Revolution: How Science Was Born in 300 BC and Why It Had to Be Reborn". Book by Lucio Russo, 2004.