"Where there is no glucose, there is no will." Avoid too much sugar, the rapid energy boost is followed shortly afterwards by a crash. Sleep well and adequately, as lack of sleep worsens the utilization of glucose, reducing self-restraint.
Positive thinking makes life easier, but the key to success is discipline. Fortunately, one can practice discipline by training one's willpower.