I have two children who recently completed year 12, so I know how hard and stressful it can be. You are not alone.
Believe it or not, failing a test or two is not the end of the world. Go and see your teacher for extra help. Create a study group with friends. Do plenty of practice questions.
The goal is to identify your learning gaps and fill them to the best of your ability. Doesn't matter what happened yesterday, focus on doing better tomorrow.
The best advice I can give you to survive this year is to not over think it. Do the best you can, one day at a time.
Try to keep things in perspective because despite your final ATAR, there are many pathways into medicine. I have a friend who became a physiotherapist and then when to med school. I know young people in science and nursing planning to make the leap.
Life unfolds in many ways. Do your best and follow the path that presents itself to you in order to realise your dream.
Hang in there