Nobody wants you to fail. Nobody will 'tell you off' and the support is available - you just need to ask. They can't see that you're having an internal meltdown and will assume you're just being a lazy student.
Go to the Dr - tell them your woes, perhaps get on some medication if you think it'll help.
Your university will definitely have a well-being office/person who can help. A lot of students develop mental health issues such as stress, anxiety, depression and so on, so they're prepared for whatever you throw at them and can even extend deadlines or offer an onsite counseller.
Feeling like you've hit rock bottom is a good thing, the only way is up.