Avoid trigger situations. If every time you drive by your favorite bakery, you have to stop and buy a donut or two, take a different route. If you tend to overeat while dining with a particular person, find nonfood related activities to do with them instead. Try, try again. Mistakes are going to happen while trying to change behaviors.
Mistakes are a natural part of the process.
Learn from them. Figure out why you strayed from your goal, and what you can do next time you are in that situation. Find positive support, whether it is a family member, a role model, or a professional. Behavior change is much easier when a positive support system is available. After you have decided to that this is the right time for you to make lifestyle changes, and have prepared yourself for the road ahead, go for it.