Allow yourself regular exposure, and gambling will become an uncontrolled habit. For this kind of problem structure, the solution is to terminate exposure. Without the laws to keep the habit structure active and strong, it will weaken and eventually lose its power. If the forces that brought you to engage in an activity that operates on the laws of learning are emotional, then my comments regarding abuse will apply. I cannot provide you with all the possible combinations of experiences that you might have as the cause of your problems.
Every experience is unique to the person.
My suggestions for what to look for are based on twenty-eight years of experience as a clinical psychologist using TNT . The experiences I suggest are meant to direct you at the first place to look. My clinical experience dictates that you will know what traumatic experience applies to your situation. For example, you know that you have sexual difficulties, but can't remember ever being abused. TNT asserts that you must have had some other bad sexual experience.