It might be a bitter pill, but sometimes failing is the best thing that can happen to us.
When you fail a class you learn that the world doesn't end when you fail.
When I attend classes and feel that I might fail, I look at it as an opportunity to relax. Basically, I tell myself, "Ok ... you may fail this class. You can either work your butt off and stress out like a maniac, or you can relax and do your best to learn the material in front of you and deal with whatever happens." I usually take the second approach. If I relax and attend to the information, even though I may not understand it, I am getting exposure to it. It's going in and my mind is going to process it. If I have to re-take the course, then the second time will allow me to relax some more and take things easily, letting myself get it on the second exposure.
If I have to, I'll review basic material in between classes or at the beginning of the second time around. Again, taking it easy.
Your situation sounds like me and math. It is very easy for me to get discombobulated with math because of my history with it. I basically learned to feel crummy and confused by math. It sounds like you've done the same with chemistry.
You may want to do some work with loosening up those tight and confused feelings and coming from a different standpoint. If you are familiar with NLP, you can do some anchoring work and change personal history with the chemistry class. If you start your work with a resourceful state, it'll help.
I wish you all the best.