"Ruined Mary's life a thousand times" Actually no,she didn't. She made one attempt when she was young, which Mary immediatly got her revenge for. It was wrong, but an action made in her youth against her sister and the family who repeatedly dismissed and ignored her and swiftly repaid. Then Edith disobeyed her father in order to tell Mary about Matthew's dissapearance because she felt she had the right to know. And she tried to make amends when Sybil died and she was sympathetic when Matthew died, even hiding her Valentine's card from Mary. Then, when the car crashed, she chased after Mary and held her hand waiting for news of who died. And then, after Mary did everything she could to break Edith and Bertie up, Edith still went to Mary's wedding day even though Mary made no attempt to apoligise. I mean, that showed a ridiculous amount of maturity. Besides, Edith only blows up at Mary when Mary actually tries to justify what she did. When talking to Tom and Bertie she took all the blame upon herself. Unlike Mary who kept making exscuses for her abominable behaviour.
As for goading Mary, couldn't you say that's what Mary did to Edith over the Turkish letter? Insulting her to her face and behind her back, as well as seducing Strallan just because she can. And she continues it in series 6. Edith makes a pleasant comment about going to th Cortillion, Mary snaps at,Bertie is found out to be a Marquess, Mary moans and makes mean spirited comments about how Bertie won't want Edith now, where Edith could hear, and even insulting Bertie who had done nothing to her except love Edith.
And even though Edith was sympathetic to Mary six months after Matthew's death, Mary could not let Edith have a day to mourn Gregson. Edith had been in hell for years, no knowing if he was alive or dead, and the confirmation of his death was meant to be her time to grieve and move on but she never had a chance.
Also, you say Mary does everything she can for the family but what about her sex week with Tony? She got caught and was willing for the story to be published, threatening the whole family and Mabel and Tony who she didn't even think about.That said, I don't think anyone should be judged for consental sex, especially when it is with a person you love. Edith spent one night with Gregson before he leaves the country for an indefinite period of time, and I won't judge her for that. Nor will I judge Mary for Pamuk or Tony. But the Tony incident does show that Mary is in fact willing to risk her family's name. And Edith wen through hell, trying to make sure the Marigold secret never came to light.
And as for Tom, although I don't think he should have pushed her to marry Talbot, he was completely right in giving her what for. Edith is his friend as well. She defended his religion and even booked the photographer for Sybbie's christening. In the episode after he returned she asked him what he planned to do next and encouraged him. In fact, in the episode where Tom and Sybil's relationship is revealed, she notes that 'there will be tears' when Robert tries to convince Sybil not to marry him, but they won't be Sybil's. She's accepted that Sybil won't be swayed before anyone else. And in return, Tom supported her about Marigold and encouraged her to continue her writing. And even though Mary also supported him, it doesn't mean she gets a free pass for everything that she does. True friendship is being able to tell your friend when they are being an arse. And Mary used Edith's own daughter against her and not only hurt Edith, she also hurt Bertie who was grieving for his cousin, and she did not give a damn despite the fact Bertie had done nothing to hurt her. Nor did Strallan, come to think of it.