As a HR ProfessionaI wuth 30 + years in, this could be tricky.
The new manager hasn't taken your job.
I doubt you have any written proof that they promised that the job was yours.
You didn't apply for it and they chose a lesser qualified candidate for it. You were encouraged to keep in touch via KIT days and you haven't, so they may not have thought you were interested. If you were as passionate about progressing in your career, as you are about the current situation, they may have dealt with it differently.
Do you get on with your line manager? Did they have any reason to think you may not return?
Where they probably did go wrong, was in not notifying you that the job was being advertised, so you didn't get the opportunity to apply. Having said that, it may come down to their policies on keeping in touch with women on maternity leave. You weren't interested in the KIT days. They cou be their evidence that they tried to engage with you.
Do you know what experience the candidate has? Qualifications alone are not the only thing to be considered. Why would they employ someone who cannot do the job? How would that benefit the company? Do you think its personal against you? If so, why? You don't have to answer any questions..it's for you to think about.
You may not like hearing some of this, but you haven't presented yourself in the best light and I suspect this is why they have gone the route they have.
The going off sick is something we see a lot of disgruntled employees doing, when they don't get what they want. It won't surprise them. It doesn't give the impression you're resilient. It will simply make them believe they did the right thing.
Going forwards, do you still want to work here given what's happened and how do you think raising a grievance will impact on working relationships going forwards.
Grievances are stressful and you're already wanting to take time off work stress and it's not even at the investigation stage. There's plenty more stress to come. If they don't want you in that role, what are you hoping to gain here? What would be a suitable resolution for you? Are you looking for a settlement?