Get a good job, get a life, get even a hobby (except gambling of course), take a look and read some sites with advices to solve this, and maybe it will work fine.
As the saying goes: The grand essentials of happiness are: something to love, something to do, and something to hope for. When you feel that you are already get hooked and addicted to gambling and you personally want to get out of it, then do something you love, do anything that is productive, and learn new skills and hope that someday, you will use your new skills for the betterment of your life.