First of all, if I was you I would do the coursework (25%) first. There are plenty of resources online for Java, you can specifically look at things you need to do for the assignment and it may not take as long as you think it would. Perhaps email your professors about your situation as they can provide help and extensions to anything. Get in touch with the uni mental health service and have you thought about going to the GP? I started my first year last year, I had to take a leave of absence because my mental health got unmanageable and wasn’t keeping up with the work. But there is still chance for you to get back on track, it might seem like a lot of work now but you say you do big study sessions, I do too. I also can’t set out a schedule for anything, so I do what I think needs to be done which people say isn’t the best way but otherwise I wouldn’t do anything because I would be too concerned over how to schedule things.
Also I don’t know if it’s the same for you, but for me the first 3 weeks the lectures weren’t that informative. Basically things you’ve done before and stuff. So not everything will be new to you hopefully, so that will help with the workload. Don’t focus on how much you need to do, just write down what lectures you’ve had the past X weeks and start from there.
You can message me if you ever need anyone to talk to or anything.