I (think) I've successfully broken this habit after falling victim to it constantly when I was younger. A lot of it is practice and accepting that you'll be deleting or editing comments a lot at first (suggestion: if you do either and they've been up for more than a few minutes, add a bit of context to the edit or deletion). Another tactic that's helped is just writing out my response, but not pressing send for at least a minute or so. I find it usually causes me to imagine potential directions the conversation could go. Oftentimes I just end up not sending if those directions are conversations I'm not interested in having.
Re: learning through argument, I often find the time I take before sending the response to be helpful in crafting the argument and learning how I feel. If you really get value from this, have you considered writing essays and posting publicly?
Re: learning through argument, I often find the time I take before sending the response to be helpful in crafting the argument and learning how I feel. If you really get value from this, have you considered writing essays and posting publicly?