Yes, leaving the university would be a very poor idea right now. You are so close to finishing, but just at that point where it is impossible to imagine that you will be able to get through this and you will finish.
I don't know where you are in school, but assuming you have a psychological counseling center at your school, you should probably go to see someone there. Talk to them about the panic attacks, the depression, and the stress which is causing problems with your family.
I would also go to see my academic advisor, because if you think about having a huge report and these two new functions to finish, it will seem completely overwhelming, but if broken down into smaller pieces, each with a short-term deadline, it becomes much more manageable. One of the problems with depression is this inability to tackle problems a little bit at a time, but that one tends to see everything as monolithic.
If you don't finish, you will regret it for the rest of your life, so while leaving school may seem like a good idea right now, I would strongly advise against that, even if it means extending your education and finishing later than originally planned.