I've found asking myself "why am I doing what I'm doing" helps - I stop midway in comments and delete them because I realize there's nothing to gain for myself or others. Helps me with overeating as well, am I doing this because I'm hungry or bored? It doesn't have to be a classicly productive answer "it's fun" is clearly a good reason, but a nudge towards positive actions helps me personally.
I understand some will find this hard though, and am not suggesting it's a fix if you have ADHD.
I understand some will find this hard though, and am not suggesting it's a fix if you have ADHD.