The resignation is a blow for the Labour government, which trails Nigel Farage's right-wing Reform UK party in polls.