A particle-field Hamiltonian in relativistic quantum electrodynamics