Be systematically heroic in little unnecessary points, do every day or two something for no other reason than its difficulty, so that, when the hour of need draws nigh, it may find you not unnerved or untrained to stand the test.
When we exercise self-control on a given occasion, we win for ourselves a little credibility we can rely on the next time around. Pretty soon we develop a reputation to ourselves that we want badly to uphold. With each test that we meet, our resolve gains momentum, fueled by the fear that we may succumb and establish a damaging precedent for our own weakness.
While we don't have much say over the desires that we have, we certainly can decide which we prefer-and then search for ways to act on that basis.