Sorry to hear. Math is a strong suite of mine, but other areas have not been. Writing is particularly hard for me. We all have different minds. Struggling with a particular topic is nothing to be ashamed of and math is a particularly hard subject that affects a lot of people.
Are there topics you are struggling with more than others? Could you elaborate on some of your problem areas?
How do you do on homework vs tests?
My senior year I found myself facing a similar scenario. About to graduate, but pretty certain I was failing a core class required to graduate. I spoke with my academic advisor. She was great, always an amazing resource to go to. She explained my options and assured me that I was definitely going to graduate on time, period. She laid out options for if I failed, to still graduate on time. It was possible to graduate with the degree, on contingency that the class be re-taken in the summer session or next semester that it was available. It greatly eased my anxiety.