Try doing volunteer work. It will get you out of your apartment, put you in contact with others and provide you with an opportunity to think of people other than yourself.
Just get out more, and try to be personable. Be friendly with people you meet, avoid people you take a dislike to. Be yourself. Get outside and get some fresh air, maybe take a road trip if you can afford to, even just a little one day jaunt, to a nearby area you’ve never been to.