Decide on your loss ratio. By the way you don't necessarily have to leave. You could paper trade the rest of the day or until you feel comfortable again. This is for you to decide and it should be part of your trading plan. Making a plan and sticking to it is critical for your success.
Some traders ignore the prospect of losses.
This sets them up for a losing scenario. It is important to think and talk about losses. If you don't acknowledge and take responsibility for a losing trade when your behavior is the culprit, you cannot begin to change the behavior problem. Realistically speaking, it isn't in the cards to make money every day. The idea is, as much as possible, to cut losses short and let profits ride.