You shouldn't drop a subject because of one bad performance. You should evaluate the reasons for this and improve upon this. Below are some of my tips for acing in maths which hopefully you will find helpful
The only way you can study for maths is essentially to understand mathematical concepts, apply your understanding by practice questions of increasing difficulty, and checking your answers and working out with those provided by the textbook or with your teacher/tutor. Before each maths exam, I would also do a summary of all the formulas that I would need and all the tips and tricks for each topic and revise over that before the exam.
One very important tip is to avoid exposing yourself to new, difficult questions the day before the exam-you would often be panicked and this would worsen your exam performance because you are not entering the exam with a calm, clear mind.
One last important tip I can give you is that you need to ask questions the minute you don't understand something-don't leave any maths lessons without understanding everything about the maths concept conveyed-because maths is a sort of accumulative subject where if you don't understand something and don't clarify it, it can have a snowball effect. I have a habit of writing tips on the silly mistakes I've made or tips to do a certain type of question alongside questions I got wrong and I re-do these questions before the exam and remind myself to avoid making these mistakes.
MATHS is a subject that needs to be practiced on a daily basis, you cannot get away with studying it the day before the actual exam. You need to understand the approach to achieve a solution to the problems, not just knowing how to answer a problem, but knowing the different types of problems you can encounter in any topic and the variation in the solution method to achieve them. Essentially, practice, practice, practice is the key to succeed in Maths.