I am in a similar situation to you. I suffered from clinical depression from the age of 16, and after coming off them this summer i began to suffer from acute anxiety. I'm worried about having to leave my course or defer because my anxiety is taking over my life. I don't know what your uni is like in terms of support, but this is what i've done:
1. Told my personal tutor. Its her job to know about my progress, and as soon as i knew this was something long lasting i needed to let her know. She arranged to meet me, gave me her home phone number despite being a busy hospital consultant, and has generally been there for me.
2. Told my pastoral tutor. They are more responsible for matters concerning your emotional wellbeing. As a result of telling her they are keeping an eye on me and are willing to make allowences if needed.
3. Saw the mentor team at my university. They are trying to help me get a mentor who can help me with the academic aspects of university life. Finding a way to get my work done despite feeling unwell.
4. Started cognitive behavioural therapy at the university mental health service to try and change the way i feel about things and therefore reduce my anxiety.
5. Started back on antidepressants. In a way i feel like i've taken a step back, but i'd do anything to stop feeling like this so i need something to help me although i feel the talking therapy will be more beneficial.
6. Made my friends at university aware. I feel bad leaning on them and most of the time i don't because i don't feel comfortable doing it. But last week i came out of my lectures and told them i was packing my bags and leaving. I said goodbye to them and went back to halls to pack. They went and told one of my lecturers from last year and she phoned me, offered to come and sit with me and talk through some of my problems. She managed to keep me here, and if it wasn't for my friends i would have left already.
I know it seems like a lot, but i am just trying to cover my bases to ensure i have as much support as is possible. Counselling sounds like a good idea, and hopefully you won't have fallen to far behind. I know what some of what you are experiencing as i have suffered depression, and you are doing the right thing in seeking help. Don't give up and don't be too hard on yourself.