I'm finding this really hard to write down, I guess it taps into some deep down insecurity. I will try to explain the situation as best I can, and would really appreciate your thoughts or advice, because the situation is causing me lots of stress/insomnia and I feel I need to confront it somehow.
We have been friends since our early teens. She has always been a bit difficult, and our friendship hasn't run smoothly at times. Over the years she has often treated me badly, not talking to me for no reason, ignoring me, implying that I'm an embarrassment to her etc. She also has a habit of comparing us, and can be a bit weirdly jealous, eg she once got in a huff with her boyfriend because he liked some music I was playing 
She moved to a far-off country years ago and I've only seen her every few years since. Last year, she and her DH came to stay for a few days, and she treated me like shit. She never had a nice thing to say, and kept criticising my children and suggesting they are spoilt, my parenting skills, my house, even my dog. For example, another old friend was visiting with their children, and I said "X's children are so lovely aren't they?", and she said "Yes, but then they are older than yours." Basically implying that my children aren't lovely (which they are, obviously
). It was literally comments like that for three days. I ended up feeling very low and shitty, and it was a real eye-opener, a bit of an epiphany where I realised how toxic her behaviour is towards me and what an unhealthy dynamic we have. I must have been so insecure years ago that I just put up with it :(
I never did confront her. I drove them to another mutual friend's in the country where they were staying for the next few days. We all went on a walk, and whenever I spoke she would look away from me, or if I stopped to help my youngest over a stream she would just march ahead etc. I felt sort of ostracised, and it was a familiar feeling but one I hadn't felt for years.. She always seems to be perfectly nice to her other friends though :(
They were back in our place for their last night before flying back early the next morning, and we all went out for dinner as previously arranged, me, her and our DH's, and she acted all nice. I had been agonising over our so-called friendship for the days in between, but didn't feel it was the right thing to bring it up.
Since then I have kept contact to a minimum, not hard because she lives abroad. We are still friends on Facebook, but I feel that she only interacts when she wants to criticise me for something, eg I put up a photo of my daughter, and she commented under it something like "we need to see more photos instead of stupid competitions!" (I had been trying to win a holiday the week before
). Which would have been fine if it wasn't the only communication she offered in months.. Whenever I comment on her Facebook, like 'Happy Christmas' etc, she doesn't reply or acknowledge. I'd like to unfriend her on FB and in rl, but that's so final and I'm scared..
Sorry, I realise this sounds so pathetic and petty.
But it's making me feel quite anxious...I feel that I need to confront the situation somehow, it's making me feel impotent and weak.
I have three children, she doesn't have any (by choice). A friend suggested this might be at the root of her behaviour, although i have lots of friends that don't have kids though, and we all get along fine 
Thanks for reading.
So, what would you do?
Feel free to ask questions, I have to go and cook now but will be back.