How to deal with despair and dark times? We have a very bad enemy and he has been around for centuries. He is Shaytan. He has vowed to make us fall.
Shaytan and his army are trying to fill us all with despair and he is always trying to make us give up. Shaytan whispers to us and fill us with these self-despairing thoughts.
When you feel like you are worthless or that you might as well just die, these are from Shaytan.
The best way to conquer these thoughts is through the remembrance of Allah. Seek refuge in Allah from Shaytan. Remember that no matter what you have done, no matter how hard things get, Allah is merciful.
It is also wise to remember that if you are struggling with your mental health, you should also go and seek professional help.