Odysseus wanted to hear the Sirens' song without dying for it. He had his crew plug their ears with beeswax and lashed himself to the mast, ordering them not to release him no matter how he begged. When the song reached him he did beg — desperately — and the crew, deaf and faithful, refused. The Greeks gave us a word for this kind of bound future-self compact: an Ulysses pact.
The principle: The version of you that has to make a hard choice in the moment is not the version best placed to make it. Tie present-you's hands now, on behalf of future-you, before the temptation arrives.