Knowing when to stop is a skill, and you need to have the courage to withdraw from the battlefield.
When you realize that you are in a bad state and are controlled by emotions, what you need to do is not to force the transaction, but to stop and return to the observer's perspective.
You can set a daily maximum loss limit, and once there are two consecutive operations due to emotional out-of-control, you can force the operation to stop, do exercise, play games, eat delicious food, meditate, and let the brain cool down.