I'll second talking to someone at your school about withdrawing from the class you know you'll fail. Tell them that you're having mental health issues and you think it would be a good idea to be on a lighter schedule while you get your **** together.

Why would trying to contact your former friends be hopeless? I'm also going to suggest that socially isolating yourself from what contacts you do have is likely to be unhelpful. Trust the people in your life to tell you if and when you are actually hurting them or being unpleasant. Don't withdraw pre-emptively. They know what they want and what's good for them better than you.

Also if the meds you were prescribed aren't working that's okay. Not everyone responds the same way to the same meds. But that's cause to talk to your doctor and experiment around not reason to give up.