I was a top student all through high school and first year of college and became utterly depressed to the point where I failed a class because I simply could not drag myself out of my dorm room to go to the final exam. That happened to be a real kick in the pants for me... to jolt me out of my state. And get me to a doctor.
Few things that may help - It is a phase, it will pass. But you need to be proactive and get moving. And get to a doctor - please. - Join a bunch of clubs or sports teams (if you're athletic) or volunteer. Sometimes going to class seems unbearable but having other activities, especially ones where you have a commitment to show up for your team helps. - Get a job - same as above. Accountability to others helps. - Take time off and travel. If you're doing fine in college and getting decent grades etc., and can afford to skip a semester - do it! College is the last time you will have a chance to do completely new things. And traveling doesnt have to cost a lot of money... esp if you're a college student and dont mind hostels. - And above all, PLEASE DONT DRINK or SMOKE POT. Both will make the situation MUCH worse.
I cant say I fully recovered but I am not at all the way I was in college. You will get out of it, but you need to act.