Hi there!
I totally know how you feel. I was the exact same with my assessments or exams leading up to year 12. It can be frustrating when you study for an exam or assessment and you feel like you didn't perform as well as you'd like. I can assure you that so many people are in the exact same boat as you. What I did to help was to basically surround myself with things that made me happy whenever I was studying or doing homework. Scented candles, drinking coffee, listening to music, watching my favourite movie all kind of fall into my list of best things to do when you're not all that motivated to study. Any kind of break from study will help you re-energise and come back fresh to study.
The best thing I told myself after I did any kind of assessment or exam (and I still tell myself this in uni!) is that I have done absolutely everything I can; and to simply wait for the marks to come. I know it's so much easier said than done, but basically if you come to realise that once you do an exam/assessment, it becomes physically out of your control, you will learn to be much calmer and stress - free afterwards. And better yet, if you have given everything you've got, and have put in 100% effort, then you should feel proud no matter what mark you get! Here's the way I see it; you could give 1000% of your effort, time and dedication to your HSC, and end up (hypothetically) with a 55 ATAR, when you were aiming for a 90. In this case, you should still be proud of yourself (IF you've given all your effort). I only say this because if you have really given all your effort, then there's nothing more you can really do. You'll just feel this amazing sense of accomplishment once you do any exam or assessment that you've given 100% of yourself in. This is true for anything in life though; give 100%, and no matter what happens, you've done your best and no one can ask any more of you. I know this sounds kind of cheesy, but it's so true!
As with tips before an exam, I always say to RELAX the day before. Casually read your notes (don't cram!) the day before so your brain can relax in preparation for the exam. Have a great sleep and a hearty breakfast on exam day and plenty of water and exercise in the days leading up to it. Taking care of yourself physically and mentally will ensure you can give 100% on exam day.
As with tips AFTER the exam/assessment, the one thing I'd say is treat yourself to something to reward yourself! The very things that motivate us can also reward us, so even if you feel like you might not have done as well as you like, reward yourself with something just for going through the assessment/exam and coming out on top.
In the end, HSC isn't everything, and I guarantee you at some point everyone in the HSC will feel like they screwed up. The important thing is to do your best, and surround yourself with positive vibes.
Best of luck with everything!