I am sure that I am right, but it is as if Satan is dragging me to think these thoughts, and I try to neglect them. At other times, I think that like everything is haram and that I am supposed to die or live a miserable life and that it is wrong to be happy. I was not like that before; I was cheerful and optimistic, but these thoughts deprive me from living. Every day, I pray that Allah would help me and take me from this world which I no longer bear. I pray on time and read Quran daily, and I try to stick to Islamic rules as much as possible, but I do not know how to be okay again. I like to learn a lot about everything: Islamic rules, biology, science and everything which gets me nearer to the truth of everything in life, but lately, and because of these thoughts, I literally have lost my concentration. I no longer talk to anyone and barely go outside; it is as if I surrender to my thoughts, which is wrong, I know. Please help.
Assalamu alaykum wa rahmatullahi wa barakatuhu.
May Allah make it easy for you, it seems like you're going through hard times, may Allah make it easy for you. What you are complaining from is nothing but whisperings from Shaytan (the devil). It would be helpful if you were to seek help from a good Muslim psychiatrist to help you overcome these negative thoughts if this becomes compulsive and you cannot push it away from yourself.
In the meantime, there are things that are needed to be done with your heart and speech and actions. With your heart, you need to revive your belief in the Creed and seek knowledge about matters of belief. If there is a masjid near you and its people are on the Sunnah, you can attend their lectures about matters of belief to strengthen your faith, or you can read some of the books of Creed, like the series on Creed written by Dr. Al-Ashqar, may Allah have Mercy on him, which has also been translated to English.
Also, halal and haram are from Allah alone, so seek the knowledge or ask the scholars about these rulings so that you will not think in a negative way, as you mentioned that everything is haram. You should also have the belief that Allah is the Most Wise and the Most Merciful, nothing is forbidden unless it is for what is best in this life and the Hereafter.
It is not permissible to supplicate that Allah take you from this world, you should ask Allah for good health in this life and the Hereafter. This life is a life of tests and trials, and Allah tests His slaves for them to turn to Him alone, worship Him alone, and rely on Him. He promised the patient ones great rewards without taking account, so be patient with whatever Allah has decreed for you, the real calamity is the loss of faith and good deeds; anything other than that is insignificance. This life is temporary and the Hereafter is everlasting, so keep your heart attached to the everlasting life through faith and good deeds.
You need to be busy and socially active; do not surrender to your thoughts, see what is applicable in your environment, and seek help from the trustworthy religious people to get you involved in productive things. When a person is not busy, these thoughts usually keep coming, so be involved in learning and teaching and helping others while supplicating Allah, the Most High.
Read the Quran with focus and humbleness, seeking cure by reciting it, and be patient doing that. Have good expectation of Allah, He is the Most Merciful.
If you can do what has been mentioned here, then please do so and be patient while facing the whisperings of Shaytan, but if you feel compelled to do otherwise, then, as I said earlier, seek professional help, but only from a trustworthy religious Muslim psychiatrist.
May Allah make it easy for you and remove these negative thoughts that are taking you away from what is good in this life and in the Hereafter.