1. If you can find a better job, then leave;
2. If you can not, then hang on to this position at this moment and keep looking.
3. Let your former boss know your situation to see if he can help you find you a better position
4. Let HR and management know your unfair situation to see if they can be of any hlep, but don't count on them
What's happened has happened, what will be will be. Just let it be and move on