I do this with Twitter/Reddit comments and occasionally HN. 99/100 I write the comment and then close the tab. Writing helps me process my emotions and then I can leave it "unresolved".
Most of the time if someone is being intentionally rude on the internet, they're also being a troll. Don't feed the animals!
This is my go to method. Write/vent it down somewhere(privately) and just forget about it(you usually feels much better after write it down anyway)
I often found that the things in my head that I got so worked up a week ago is just mostly my made up thought.
Often, I'd realize that I don't want to send it at all. The emotion was processed and now it's fine.
Sometimes, there is a valid point (e.g. because someone was rude in tone) and I'd just give that as feedback in a non-violent manner.