Self-regularization of Hamiltonian systems