Seek help from a support group, they should be able to help you. Or get another hobby to keep you occupied so you won't have time to gamble. Or you could just play with "Fun Money" which some places offer where you can play without real money! Also, whenever you want to gamble, think about all the money you lost. Think about how it made your life bad.
Yes, take DarkStar's advice. The first step is realizing that you have a problem....but that's not enough. You have to be proactive in your effort to change the behavior that is creating the strife in your life. By seeking out the help from a support group, you will be able to learn from those who've been where you've been. And, you'll be able to work together to find alternative activities to replace those activities which you know you should avoid.