The first case is due to ultraviolet divergences of the quantum field theory in question. In this case, cutoff-dependent counterterms must be added to the Hamiltonian H in order to obtain a physically meaningful result. In order to understand the second problem, one can perform perturbative computations to understand the continuum limit analytically.