The Labour party must now heal its self-inflicted wounds