I was in a similar boat end of sophomore year.
I really, really got myself together, sorted out my personal life problems that were holding me back, starting eating well and exercising, and worked very hard to become a model student.
It all became second nature to me, and nowadays I have to convince people that I was ever like that- I am not applying this cycle, but I was an "A" WedgeDawg applicant despite my couple of low grades.
Get help, get more friends, and take care of yourself. And your schoolwork- it's all related.