Assalamu alaikum! Lately I've been anxious about bad things happening to me or my family. I don't know if this is related to that, but I don't pray 5 times a day, although I'm trying to get better. But every time something bad happens to me, I wonder if it's a punishment from Allah because I'm not a very good Muslim, or wonder if I could have prevented it if I had prayed more. Is that a correct way to think about misfortune?
Alaikumassalam wa rahmatullah,
When things go wrong in your life it could either be a test, a punishment, or a sign or reminder. So it is right to fear that you may have displeased God. When something bad happens to my children, even if it just a fall, I always worry if it is because I have done something to displease God.
The Quran says:
Whatever good happens to you is from God, and whatever bad happens to you is from your own self. We sent you to humanity as a messenger, and God is Witness enough. (The Quran, verse 4:79)
The Quran also says:
We sent messengers to communities before you, and We afflicted them with suffering and hardship, that they may humble themselves.
If only, when Our calamity came upon them, they humbled themselves. But their hearts hardened, and Satan made their deeds appear good to them.
Then, when they disregarded what they were reminded of, We opened for them the gates of all things. Until, when they delighted in what they were given, We seized them suddenly; and at once, they were in despair. (The Quran, verses 6:42-44)