Blood IS thicker than water. You had do know that. Sure they thing she screwed up, but it is her daughter anyway.
All of this is not about you, you were not the one screwing around, your conscience is clear. You really have to get into a different mindset.
And yes, don0t be her friend, friends are family we choose. How on earth is one going to be friends with anyone that does this to them. NO WAY IN HELL. Friendly coparent yes. Friends - NO!
You are doing well buddy, stay strong. It is still early days for you, but I thing you are slowly getting over the hump and things will soon be better (not necessarily with the W), you will grow stronger and pain will be lessend. Have no expectations, because when they get shattered, then there is hurt.