Reacting immediately to a situation without thinking through is a bad idea.
No matter your situation, you won’t be the first person to face it. Most of the time solutions exist. The only thing you need is patience. Many people I have seen lack patience and are not consistent enough. Even I have seen very few people who try to be consistent.
You need to find something to do that can add value. If you try to do that, you will definitely learn many things.
There is a famous quote “An empty mind is a devil’s workshop”. Never let yourself be in that kind of situation. Whenever you feel low, you should read about people who were in that kind of situation and how they came out. Changing yourself takes effort, so developing that kind of mindset is important.