I'm sorry you are struggling with so much anger.

Of course I don't know what is causing you to fail. You wrote you're "not supposed to flunk." I'm not sure what you mean by that.

I presume perhaps you mean you worked hard enough you felt you should have passed. It certainly would be discourging to work really hard at your studies & then learn that you failed in spite of all your hard work.
I certainly understand what you're saying with regard to your parents' comments. Telling you to believe in god & stuff, & telling you everything will work out for the better in the future, really isn't helpful in my opinion.

But I presume your parents are trying to do what they can to be supportive & don't know what else to say.
Of course, I don't know anything about you or what you're studying. But I wonder if perhaps this might possibly be a "square peg in a round hole" sort of situation? Do you really want to be studying what you're studying? Or is what you're studying something someone else encouraged you to pursue? (These are rhetorical questions. You don't need to answer them here, of course.) Another thought might be that, although you're working hard, perhaps your study skills could use some work? (I'm just throwing out ideas here.)
Perhaps in the alternative the subjects you're studying, while they may be of interest, are just not things you have an aptitude for? We all have things we're good at & things we're not. (The only reason I graduated from college was because they dropped the foreign language requirement while I was a student. Otherwise I'd have
never made it.)

And trying to find success in a field you really don't have aptitude for can bring on a boatload of frustration, from my perspective.
Anyway... if you feel you've been giving your studies your all & you're still coming up short, maybe you need to be talking the situation through with someone at your school... perhaps a guidance counselor or academic advisor of some sort. (Again... I don't know anything about your school. So I dont have any way of knowing who would be available for you to talk to.) But the thing is, as you wrote, this is all causing you to be filled with anger.

And the only positive way I can see to get through this is to somehow figure out what's going on here & how you can work around it or get past it. Allowing the pressure you have building up inside you to continue to build is only going to make your situation worse.

So I hope that, in some way, you can figure out a way to take some kind of positive action to find a solution to this anger-provoking experience. I wish you well...