If maths is compulsory for your course, then you'll need to pass it.
It really depends on the policy of the university and / or course and to what they will / won't allow. Some simply take an average of all your grades, so that would ultimately depend on how well you did in all your other subjects. Others have compulsory modules, meaning you have to pass certain ones in order to proceed. Having said that, there are sometimes extenuating circumstances, where they can make some adjustments at their discretion if you can provide proof that it compromised your exams.
I'll let you into a little secret here... there's a HUGE difference, between knowing a subject and passing an exam. You can have all the knowledge in the world etc. but if you can't perform on the day, then it doesn't account for anything. On the other hand, if you can learn the format of an exam, it can be relatively easy to get a good mark, even if you only have a mediocre knowledge level.
I'm assuming you're resitting in September?... So that gives you just over a month to prepare for it... here's what I suggest:-
1) Move up to University over summer period:- If you can, I'd say stay close to your university and prepare up there because: a) there's likely to be less distractions than when you're at home (all the undergrads won't be around, so no one to go out with) b) You'll be close by to the lecturers, if you need help with anything. A lot of places offer cheap rent over the summer as well.
2) Speak to the lecturer:- If you approach them, they can be quite helpful / accommodating to help you out if they can see you're serious about passing the exam. Remember, it's also in their interests to pass as many people as possible as it looks good on them.
3) Study the past papers:- You'll find there's a common format for exam papers... it's too much work to change everything... in fact, there's a good chance the resit exam may be identical to the one you had taken?
4) Attempt ALL parts of the question:- The first 30-40% of a question is normally quite easy to get... next 20-30% you have to think a bit more, and the last bit are only really for the very best in that subject.
5) Manage your time:- As said above, first part of the questions are normally easy to get. so don't spend too long trying to get a perfect answer for one question. Allocate your time evenly for each question and when you feel you've done enough move on to the next one. You can always come back to it if you've got time.
6) WRITE SOMETHIGN DOWN:- Attempt all parts of a question. Even if it's just brainstorming / random thoughts... you'd be surprised what you can pick up form that.