Watching your friend suffer is never fun. If they are fresh out of a breakup and really hurting, it is so important for you to be there for them so they can feel like they have someone on their side. However, it can be difficult to know exactly how to go about it, and the balance between doing too much and doing too little can be very delicate.
The first thing to remember is to avoid saying “I told you so"" or insulting their former significant other. While it seems like you are being supportive in bashing their ex to lift them up, it really is too soon to bash someone that they really cared about. Maybe once they have started healing you can start to joke around together, but for the first few weeks just remember that they really loved that person, even if you did not.
What your friend really needs in this time is your support, but the amount of support depends on the person and the break up -- so test the waters first. Shoot them a text or see them in person to tell them that you’re sorry and that you’re there for them for whatever they need. See how they respond to that. Maybe they will ask for some company, or maybe they will ask for you to give them space. Listen to their desires, but don’t give them too much space even if they ask for it -- even if it’s not quite what they say they want, you checking in on them will mean a lot as long as you don’t overdo it.
Listen when they vent. Now is not the time for your opinions or comments; now is the time for you to hear what they have to get off of their chest. Now is the time to just be there for them with open arms. Unless they ask for your opinion, it’s probably best not to offer it.
Go out of your way to be nice to them even if they aren’t in the best mood. Maybe collect some of their favorite things to give them, or plan something like a “girl’s night in" where everyone can gather to be supportive (and maybe that’s when you start trash-talking the ex).
Know that it will take time. No one heals the same way or in the same amount of time. Know that your friend will likely not be quite the same for a while. Don’t rush them -- no saying any form of “you should really be over it by now". No one knows how it feels to be inside their own head except for them. You don’t know what that relationship meant to the two of them, so you don’t get to be the judge of how long it takes to recover.
Overall, it is really just important for you to treat them the way that you would want to be treated after a break up. Yes, the Golden Rule still applies long after elementary school. Acknowledge that they are hurting and treat them accordingly, and they are likely to do the same for you.