It is a very western way of thinking.
Training is not a good way for releasing bad energy or stress.
Stress makes your body release a hormone called cortisol.
Exercise also to a certain extent is a stress in the body and makes your body release even more cortisol.
So the mixture of those two is not great at all.
The best thing when stressed is to totally go simpler and there is nothing simpler than following your breaths.
Slow breathing is the way to go if you are feeling mentally stressed.
Sit down, nothing special required. Then do deep breaths through your nose for at least 5 minutes. If you can do it for longer the better, but I always think that everyone has at least 5 minutes to do it.
Same rule applies for other forms of stress like lack of sleep, airplane trips, too much work and so on.
If you feel out of whack, stop everything, breathe in and out and regroup.
Had a hard day and wants to put things out in a boxing session?