Most importantly, I believe greed/emotions vary based on individual personality and everyone needs to understand this about themselves.
Emotions should always be out of the door when you are trading, think yourself like a bot and act precisely on why you want to buy something and why you want to sell it. If you have a good logical reason to buy something, you should not be losing too much, if you put emotions into your trading the losses will be far greater and far more frequently. Plus if you do not think emotionally you will not remember last loss when doing the next trading as well.
Handling losses would be in a manner like accepting losses. Just moving out of the scenario and focusing on next trade will definitely help anyone to become profitable over the time. When you are making more profits than losses and occasionally facing a loss and then moving out of it will become everything as a part of life. Yes, losing moments will lose its significance when you remain a profitable trader.