We know how easily affected we are by our environment -- our skin tans with sunlight, our taste buds activate when we see food, and so on. Our sense of self, too, is highly susceptible to environmental cues (both external and internal environments). In essence, what we experience as our self and, by extension, self-esteem, is a powerful depiction generated by our brain.
Working out and eating correctly is likened to cleaning your house. If you never picked your house up, little by little it would become toxic. If you look at exercise from this vantage point, and not just from the desire to look good, you have a greater chance of staying motivated. Live clean and be lean.