In this paper, we give a new proof of the classical KAM theorem on the persistence of an invariant quasi-periodic torus, whose frequency vector satisfies the Bruno-R\"ussmann condition, in real-analytic non-degenerate Hamiltonian systems close to integrable. The proof, which uses rational approximations instead of small divisors estimates, is an adaptation to the Hamiltonian setting of the method we introduced in a previous work for perturbations of constant vector fields on the torus.