This is definitely a problem.
I only started playing
online poker this year, and within the first month I lost my bankroll (well, we can't consider it relevant as it was only $20 at the time).
I promised myself that I wouldn't let it happen because I knew that I had lost everything due to lack of control precisely because I saw 'miracles' happening for the villain.
Initially, I think it's clear that you should work on your poker mindset and set goals for losses.
Always play buy-ins of at least bankroll/100....some people recommend /1000 others /50...so you should find what works for you.
We cannot control the actions of others, so we must focus on improving our own.
Today I went crazy with 3 hands from 3 different tournaments... they all broke my structure and made me lose the respective tournaments, but in my case being a tournament is less painful in my pocket.
Taking a deep breath, having a boxing bag, smoking some good weed helps me during the session.
Anyway, good luck at the tables... and try to define your priorities in the medium and long term...