If you dont like your life ,change it.Change your negatives to positives.
Go get a job- any job- or volunteer somewhere...it will break the cycle of sitting at home pondering how hopeless life is.
From.jobs come prospects and doors open to new possibilities and from interacting with people,friendships grow -just dont tell everyone you meet how miserable you are because that just puts people off, they dont want to be burdened with someone elses issues as well as their own - just be cheerful and chatty even if you dont feel it at times.
No one likes being around miserable negative people with bad attitudes...generally people respond well to happy positive people,if they dont,dont let it bother you....most will and youll make new friends,maybe even a social life...from that maybe a relationship...who knows
If you like sport or outdoor sctivities go get involved in those..most are cheap or free...the ssme prospects of friendship and doors opening applies.
It wont happen overnight,you have to work at it and therell be disappointments along the way but you take them in your stride and move on, dont treat them as criticism of you personally.
How long it takes is really up to you and how proactive you are in changing your life,grabbing opportunities when they appear and accepting peoples generosity friendship and invites when theyre made.
The change is yours to make and its one only you can make .