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.