Making friends as an adult is hard. At least for me, I don't think I necessarily "lack the confidence to make friends", but I do lack the confidence and further more the desire to go up to random people who I don't know and make small talk with the small potential that there would be some sort of future interaction.
For me
www.meetup.com has been useful to introduce me to new people in a "low risk" environment. If you haven't heard of it, it's a resource for finding groups, clubs, or events in your area of common interests that you might have. The first few meetup events I went to were semi awkward, but I found to end up liking it because I can't stand small talk so joining a group of new people at an activity that I enjoy doing made it easier to connect. I.e. if you are meeting a random new group of people to play Ultimate Frisbee or meeting to play a new board game you don't necessarily have to make a lot of small talk in order to have a lot of interaction (there's clearly something to talk about or do). I've never really understood going up to random people at a bar and trying to have a conversation about pointless things. It also helps that whenever you go to a meetup it's likely that there are also other completely new people there. I've been to meetups for hiking, different team sports, board games, an occasional random group of people meeting for dinner, etc. The last time I went on vacation solo I was able to join some meetup groups in the area and had people to hang out with while on vacation.
That being said...I too have been pretty depressed and was strongly suicidal about two months ago and now things are just "okay". Being depressed and lonely isn't easy. It plain old sucks. It also takes a lot of effort to be social or conversely very little effort to be antisocial especially when you are depressed. I think a learning for me is that when I am depressed I simply may be incapable of large amounts of social interaction and I've adapted to that mindset and have had an easier time with "accepting the loneliness". I think mentally I'll be ready move on from my current state in a few weeks.