Your mind is a collection of neural networks.
Your neural networks are made to predict the world in a way that improves goal directed action.
Negative emotions are failures in the predictions, fear is mostly computational error (because all you have to fear is fear itself) and positive emotions are when your predictions of the world match objective reality.
The problem is that your mind has to compute everything, so a negative stimuli can’t simply be discarded. If you experience something negative your mind has to make sense of it and it will change the weights within your neural networks to compute the world in a new light (I’m worthless, the world is a terrible place, no one loves me).
Your mind does this because it wants the world to make sense and it tries changing the weights and biases within the mind to see if this new configuration makes more sense.
The entire object of the world and everything in it is computed with these new weight to see if we need to update any values. Hopefully some networks will be filled with stimuli that contradicts the negative emotion (the memory of a loved one, the encouraging words from a friend, a personal accomplishment) and this new stimuli makes the network backpropagate and changes the weights back to default so we go back to feeling normal.
Your minds primarily goal is to make sense of reality and everything else is secondary. Feeling okay is less important than living in a world you can predict.
If you are feeling shitty, just remember this.
You are feeling bad because you lack stimuli that makes you feel good. The easiest way to feel better is to create that stimuli for yourself.
Sing, dance, draw, paint, write, listen, hug, love, read, run, talk, think.
Do whatever you need to do gain the information you need to make your neural networks return to their default values. Once your network is updated you will feel good again.