admit defeat
To yield to the opposition or accept that one is wrong in some pursuit. Well, I ran a good campaign, but it is time I admitted defeat in this election.
snatch defeat from the jaws of victory
To fail, lose, or be defeated despite the appearance that one would be victorious, especially due to a mistake, error, or poor judgment. (An ironic reversal of the more common "snatch victory from the jaws of defeat.") We were ahead by nearly 20 points with less than half the quarter remaining—how on earth did we manage to snatch defeat from the jaws of victory like that? The candidate has led in the polls right up to election day, but with that unfortunate remark last night, he may well have snatched defeat from the jaws of victory.