Effective Hamiltonian for bound states in Yukawa theory