Everywhere I have read about trading, it is mentioned that one should trade "without emotions". As human beings this is impossible. Our brains aren't wired that way. So I believe in self care.
After a loss, I step away from the trading desk and take care of myself. I'll take a walk, snuggle with my dog or make myself a hot cup of tea. Feel good activities, even for 10 minutes will prevent revenge trading and allow you to acknowledge loss and accept the loss, then get back to trading with a calm affect.
At the end of a trading day, I fill out a trade journal and make a note of why the loss occurred. Could I have set a hard stop? Did I risk too much?, etc. Having notes to look back on will help prevent me from making the same errors.
In regard to recovering those losses, I build back by taking smaller positions and tier into and out of positions. I set smaller daily goals, as opposed to aiming for endless gains and once I reach those goals, I don't initiate further trades.