I had set some rules before trading so I know how much I can loose it or have capacity. Also I have a stop loss always set so that even it triggers it is a limited loss . In trading , one always can’t make money and you will incur losses as well and should be ready for it .
This can be considered as risk management. This is very helpful for every trader, we should think that not all of our trade will succeed, that's why there is stop loss and it is MUST put stop loss for every trade especially you are in margin trading which is riskier and can lead you to liquidation.
One thing we can handle losses in trading is the total stake on every trade we do, like 5% - 10% per trade of our total available balance is good for me.