Hello Friend, Good that you are seeking a help here. Sleep is very essential for both physical and mental health. Such sudden mood swings, negativity, lack of interest, loneliness etc are symptoms of stress and anxiety. Reason could be stree caused by worries your studies or careers or relationships etc.
Don't worry, such emotional disturbance are something similar to any other physical illness and can be treated through counseling session, mindset and few lifestyle changes, self therapies etc
Next Steps
Don't hesitate to consult a psychology counselor directly or online. Feel free to reach out to me online through Practo for further detailed evaluation and recommendation that you can follow practically to overcome this problem. Be positive. You will be alright soon.