For this answer I am going to assume that you are legally tied in to the position and have no way of removing yourself from the situation. This answer will therefore be tailored for how you can best prepare yourself to get through the next couple of months.
Services for dealing with stress
Quite a few companies, depending on where you are, have an agreement with a third party company that help deal with difficult situations. Whether this is stress, grief, anger, sadness etc.
It might be worth your time investigating if this is something your company offers. If you are unsure you can always ask HR. If your company does not offer this kind of service then it might be worth your time to investigate counselling yourself.
Stress can have very serious effects on your health, especially prolonged stress, and this can have strong ramifications on both your physical and mental well-being. If you are ever feeling that it is getting you down too much or that you are too stressed, please do not hesitate to see a doctor, your health is far more important than a single job.
Disclaimer: I am not a lawyer, regarding employment law and the bounds of your contract you should definitely contact an employment lawyer.
Ok so let's assume your contract does indeed say that you work from 9-5. If your supervisor insists that you MUST stay until all your work is completed you can say no.
However, don't be rude, always be respectful to your supervisor, even if s/he is disrespectful to you. Try not to degenerate into an argument over it, politely explain that you have commitments to maintain outside of the working environment and that your contract clearly states that you work from 9-5.
I would also hazard you to make a choice, if its only going to take an extra 5-10 minutes it might be more beneficial to just be a team player and complete the work (provided you don't have other commitments you might miss) however if it is going to take 3-4 hours extra then it might be in your best interests to decline.
If you are consistently being asked to work out of hours do not do it for free. If the work will take an extra hour of your time, be sure that you make sure you are getting paid for it! If they won't pay overtime don't do the work. However, you should endeavour to explain this politely, if it degenerates into an argument it may be best for both sides to cool off.
Improving your workflow
An alternative method might be how to best complete as much work as you can in a given day to minimise any extra time you might need to be working.
If the work you are doing can be done by yourself and you aren't needed by anyone else and if your workplace allows it, you might find it beneficial to isolate yourself to ensure your workflow isn't interrupted.
This can be done by actual isolation in a separate location, or can be achieved by listening to music or white noise at your own desk. It's important to still interact with your team otherwise you will be completely isolated, which causes problems of its own.
So if you can't find a way out of this position, and you cant find a way to explain to the supervisor that what s/he is asking for is impossible / improbable then there are still things you can do to improve your working environment and to ensure that the stress doesn't get the better of you.