I heard a message recently titled overcoming your worst enemy, the flesh. The premise of the message was that your worst enemy is your flesh in some cases; victory over self desires propel a man to victory over life. The assumption is that overcoming your heart's desires makes it easier for you to overcome any external pressure; I agree, but what does it take to overcome self? Self-discipline is a word with many synonyms; for example willpower, self-control, living an unwavering life, resistance, etc.
Self-discipline is how best to overcome self. By definition, Discipline means the practice of training people to obey rules or a code of behavior, using punishment to correct disobedience. The key words in that definition are "training", "code of behavior", "punishment" and "disobedience". Training often entails rigorous activities; it entails practice overtime; it involves structure. For one to be disciplined one must be ready to train. Code of behavior implies a defined desire, an established guideline, a moral compass for the culture or environment one belongs to. For one to be disciplined one must be ready to follow the code of behavior established and predefined. One must be trained in the code of behavior as well as the desired practice to ensure following the rules. Punishment entails an infliction of a penalty for something done wrong. When you've been trained to follow a code of behavior but you fail, a punishment may ensue. Disobedience entails a conscious effort not to follow the rules or code of behavior defined; it often involves rebellion; making a choice not to follow the instructions outlined. A disobedient person is often punished.
In essence, for us to overcome self, our worst enemy, we must practice self-discipline. We must train ourselves in the code of behavior defined by our moral compass (which I believe should be based on the Bible). In order for us to continue to pursue the self-discipline appropriately we must therefore punish ourselves whenever we are disobedient to that code of behavior. The difficult task is punishing yourself when you've done something wrong. If you can actually punish yourself when wrong you would've surely practiced self-discipline to the point of overcoming self.
The bible says work your faith (salvation) with fear and trembling, therefore pursue self-discipline with the understanding that it is a path in life, not a final destination. You might fail every once in a while, but let those failures be far and in-between overtime, the more you practice this, the better you'll be at it.