Depends. How much is the exam worth? Can you repeat it?
That said, even if you can repeat, the same thing might happen again, so I suggest passing this one.
Work out what you need to know (that's the hardest part) and then just sit down and work through it whatever way feels best (don't bother with the 'correct' way to study etc... doesn't suit everyone). Yeah, your head will probably hurt and you''ll feel really tired, but just think of it as a sign that your neurons are starting to wake up
! Once you reach the end you'll get a second burst of energy to go back over it. Oh, yeah take a break whenever & as long as you need to (but don't set one for 'every 40 mins' or any time interval- I tried that and all that happened was I worked for 10mins and then spent the next 30mins wasting time until my next 'break'- just work until you can't)
Sorry, i know this sounds kind of preachy, but I've just sat 2 exams in 2 days and I know the feeling! For the first, I panicked, didn't know what to revise and ended up just staring at a page, procrastinating and 'knowing' I was going to fail. I felt awful after the exam. The second, I just sat down and learnt the stuff (hard to explain- I had a better idea of what to learn though and just read the notes, with a pen and paper beside me to jot down points). Um, my point is (yeah, I do have one, don't worry), don't aim to do anything- don't even think about the exams. Just tell yourself it's got to be learnt and get on with it
Hope that helps! All the best!