Once you've identified the problem as "greed" you should be able to tackle it by being satisfied with what you have or what you get from gambling so that you don't keep gambling even if th odds and luck start being against you. So I will recommend self discipline and the ability to know when to stop and be satisfied.
well that's the hardest part mate, knowing when to stop and discipline your self since greediness really eating you up every time you think that you are lucky, maybe limiting yourself and make some awareness that there's certain amount to target or certain percentage to place win or lose you needed to quit.
I dont think it is really that hard what it happens is that most people dont really think things through before doing them, if people took the time to think before doing anything crazy then we will not have people addicted to anything but unfortunately that is not the case.