From an outside perspective, it is very easy for us all to say "leave him". We aren't emotionally intertwined with this man, nor do we have to deal with the mental, legal and financial fallout that would come from leaving a relationship when you have three children. Its easy to say leave him but it's not easy to do, and we all know that.
That said, it seems that this man does not respect your feelings currently and, if this is not going to change (suggestions on this to follow below) then leaving him is absolutely what you should do.
From the short amount you've said in the original post, I am guessing that he's a bit of a people-pleaser with his mates (perhaps not so much with you anymore, which probably annoys you, but he's still good to you most of the time). I get the sense that he might almost word-vomit the inner details of your relationship to keep a conversation going/get a laugh from his friends. I wonder if he actually doesn't realise the full effect its having on you, because he's a bit blinded by the good feedback he gets from his friends when he lets them in on these intimate details of his life. He'll hear your words when you tell him you're mad, but he'll probably feel defensive and shut down and it won't go in. He then needs that pick me up from his mates and the cycle continues...
(PSA: None of this is excusing him by the way - I'm just trying to see it from a man's POV).
If you feel that resonates, it sounds as though he's not quite as emotionally developed as you, and you might need to try to guide him to a place where he can be. Irritatingly, this might be through some subtle adjustments on your end as to how you approach the next occasion of disrespect. Do you find your conversations are fresh of the heels of his conversations with the lads? Are you feeling deeply hurt at the point you talk, and you find it difficult to hold back your emotion? If so, I'd maybe try and park your feelings until the kids are in bed and then ask if you can talk about what happened, and ask if you can try to keep the conversation calm. Don't talk over each other (so hard, I know!) and if he tries to talk over you, stop, wait, and then carry on exactly from where you were previously, without acknowledging whatever he's just interrupted you with. Set your stall out (non-aggressively) that the next time this happens, the outcome will be xyz. I'd also try to ask (genuine) questions, e.g. "is it not clear to you what topics are off-limits for discussion with friends?", "would it help if I explained what would be "off-limit" topics for me and why I feel that way". It's so much harder for someone to get on the defence when it feels like you genuinely want to know their opinion.
I absolutely hate suggesting a woman change when she's so clearly not the one in the wrong, but sometimes men are so inept at communication as a result of their upbringing, they genuinely do not know that it is possible to have a "disagreement" without it becoming an "argument".
However, if you have done all this previously and he's still acting this way (or you try this and it continues), I most certainly would question the respect he has for you. Without mutual respect, there is a power imbalance within your relationship and you may never feel like equal 'partners'. Would you be happy living the rest of your life like this?
Leaving this man may feel terrifying, but you will be setting an example to your children in the future that they deserve to be respected (a particularly great lesson if you have girls) and that they should treat people's feelings with respect and dignity (a particularly great lesson if you have boys).
Sorry you are dealing with this and I hope you find the answer x