I feel sorry for you but I also think the company is entitled to do this. It is all very well being helpful around the timing of the leaving date, but if the letter confirming your bonus attached these conditions, the company is entitled to claw back the bonus.
Hindsight is a wonderful thing but if you knew about it, I wonder why you didn't specify a leaving date of Monday 1st June instead of Friday 30th May, or negotiate a different arrangement at the time of resignation..