It seems to me, in my experience, that there are two types of pain.
There is the pain you create through a process of having negative thoughts, which result in anxiety or emotional pain, and then a combination of the thought and feeling continues to cycle the same types of thoughts and same feelings. You can exercise and eat better, which will help your body feel better and make you less prone to this cycle, but at the same time you must try to stop these thoughts. Realize that they don’t serve you, they only stress you, cause the pain.
The other type of pain is the type that is repressed. It surfaces in various ways and influences our behavior. It causes us to unconsciously defend ourselves in various ways, brings about behavior we wish we didn’t have. We hate ourselves for the behavior, and because pain isn’t pleasurable, or on some level we mix it up with the type of pain we create, we avoid it. We eat, or smoke, or anything else we can to avoid it. Ultimately the rule is that if you allow yourself to feel it, it will be gone and you will be more at peace.