Welcome to the forum, where there have been all sorts of experiences to draw on.
I guess it's only natural to need a parent's approval and also love, they hold a special place in one's life and heart. They can be role models, sources of love and comfort, and hopefully the wisdom that comes with a longer life.
Unfortunatly parents do not always live up to such expectations, mine didn't, and it was over a girlfriend too. I was in circumstances where I could be independent and therefore able to make a choice.
I'm unsure as to your circumstances, maybe you need to remain with your mother for practical reasons, which is a hard thing. You know that anyone can have an opinion, justified or otherwise, about another. You also know that there is such a thing as being two-faced which is dishonest and undesirable.
Constant nagging is never on.
For your mother to present a nice face to your friend, then complain about him behind his back and give you an ongoing hard time over it is unjust and simply reduces her worth in your eyes. It can also have the effect of driving you more towards your friend. If that is good or bad I don't know, but you would.
Your ex-boyfriend is really a dead issue, no matter what she feels and says, and if you are content with your friend, then not recognizing that and offering you a new alternative is pretty dumb.
As I said I was in some respects lucky, I could disregard my parents and choose the one I loved (and remained happily married to her until she passed away). The break made me grow up, be independent, and learn how to look after another.
So I guess it is partly circumstances, partly how deep your feelings are for you boyfriend (and his for you) and partly your ability to see the faults in your parent and if you see yourself as being able to live with a parent you no longer hold in great esteem.
So no answers from me I'm afraid. On a practical level maybe firm boundaries might help, walking away from each toxic episode as it starts and simply not allowing it to continue.
Other than that is there anyone in your family you can rely upon to talk regularly with you and just care? Perhaps even retreat to on occasion. Trying to face this by yourself is very hard.
Please let us know how you get on