As you said you are going to graduate from uni i would guess either you are at your late teens or early 20s ..... bro it's just the start of your life .... you have a longgg way ahead and the most important thing is you have time to change .... according to your problems i would recommend to you 3 things ......
1st. Get your ass up and go to a gym this is the perfect time for that .... believe you will feel wonderful working out and also the gym environment is really supportive .... people won't judge there however you look only if they see that you are giving your best to be the better version of yourself .... however you look skinny or fat ( 2 yrs ago i was 102 kg/225lb while having an average height but now i am down to 75kg and believe it feels good to see the improvement) you can do it
2nd . If you think people with talk you in the respect of how you looks then you are deadass wrong and those who judge you bcuz of your looks they weren't meant to be your friends in the first place . Try to find and talk with people of your same interest and humor..... it would help you to start a convo and the rest is up to you (Btw if you have that problem like you can't talk even a little bit to anyyyyyybody then i would recommend joining a group discussion of some sort
And lastly, Don't think about yourself as a failure and also don't ignore your hobbies ik it easy to say but honestly these two things are the worst things you can do to yourself ...... you will have many many many opportunities believe me and if you don't stop thinking yourself as failure you won't be able to catch those opportunities.
Sorry for writing so much but brother i hope you change your mind and take care of yourself brother