A combined use of perturbation theory and diagonalization: Application to bound energy levels and semiclassical rate theory