Before you put yourself in a position where your decisions won’t align with your intent, do all you can to create structures around you so this alignment is closer.
Heighten your awareness of penalties and rewards with particular actions so your options in the moment feel limited.
As an example, there is no better deterrent to a night of excess than an early gym session the morning after. This is especially the case if the gym sessions are already an established routine and if there’s also a financial cost if you cancel.
.