Actually I am one of the most impulsive people on the planet. Lots of times it has served me very well, so I don't always see it as a bad thing.

But I do think it is as simple as that. Just don't do it. If it's a matter of getting drunk and shagging someone you shouldn't (for eg) think about it before you go out. Don't drink too much and wear granny undies for backup. And choose to go home by yourself. Waking up the next morning feeling happier will be the impetus for you to continue making better decisions.

Maybe it's a maturity thing, or maybe you haven't learned your lesson thoroughly enough yet but learning to say no isn't actually that hard so next time you are in the moment - walk away. Just try it properly once and you won't look back.