In other to control greed in gambling one have to Set limits: If one have the potential to bet beyond his/her comfort zone. Its a good idea to set a daily limit at the Bookmaker to ensure you don't do anything you regret.
Lower the risk: it might be an idea to bet at lower odds you bet at to ensure that you don't have huge swings in the results. And don't raise stakes to chase loses, hold steady at a comfortable maximum stake.
The greed will make you lose money, so in each instance when greed affects your profits that should be lesson enough. Bettors learn by their mistakes, its a constant learning curve.
If you approach your betting from a standpoint of protecting your bank/funds then the greed trait is negated.