How to solve any problem
How to stop panic attacks
Addictions are habits. Some addictive substances grab you physiologically as well, but above all, you respond to a habit. After two weeks without smoking, you are over the nicotine. And yet, people often go back to smoking after two years! Marijuana is not physiologically addictive at all, and yet it can be very hard to give up. And in gambling, sex addiction, compulsive risk taking (eg., shop stealing), there is no chemical substance involved at all.
Thoughts are habits. And THOUGHTS CONTROL EMOTIONS. Sometimes, a person suffers emotional hell for years, and nothing changes. CHANGE IS THE RULE. If things stay the same, some force is keeping them that way.
One very powerful barrier to change is a habitual thought. In a given circumstance, a thought pops into your head, and the emotion follows. And this is usually a vicious circle: the emotion is in turn a trigger for other thoughts that keep the misery going.
WHAT TO DO ABOUT IT
First, check out if this is true in your case. Think back to the last time you felt miserable, and recall the thoughts associated with the emotion. This may be hard at first, because these thoughts are so well practiced. So, don't just 'remember', but 're-enact'. Actually go back in time and be there. The thoughts will come, and you should be able to capture them.
Look at my problems page and do all the relevant things I suggest there. In particular, keep a diary of the thoughts.
This does two good things.
First, you are a detective, a scientist working out what actually keeps your habit going. You will find invariable thoughts associated with certain actions and emotions. And you will track down the triggers that activate these thoughts. After this, YOU can be in control. You can get rid of the things around you that are triggers to the unwanted habit.
Second, as I say on my problems page, when you are an observer, the emotions are not as strong, more bearable.
The next point is: HABITS FILL A VACUUM. To get rid of a habit, replace it with something else.
Above all, BE KIND TO YOURSELF. A habit is very hard to break. When you have succeeded for once, pat yourself on the back, reward yourself with something. When you slip back (as you will), that's OK. You'll do better next time. Work out what got in the way, and modify your approach.