Agreed with radeng with the exception that you do need to see a psychiatrist, especially if you are suicidal. You don't play with that, you don't look for help online but you go directly to his or her office/hospital.
Other than that, try to change your life around, take it easier, relax. Get a hobby, do something what you like. You can't be dependent on women, you can't base your happiness on how many girls you get, women simply feel it and they don't like it.
Women do want a guy that is leading. A guy who makes decisions, e.g. where to go for a date. They can't make much decisions themselves, and if they can they don't want to do it (unless they are feminists), thus they love guys who can do it. Learn to be leading on dates, learn to be leading the girl(s) to the bed. Don't leave it up to her.
Learn to be independent of women. If you approach a girl and get rejected, smile, shrug your shoulders - and move on. Who cares? Don't get your mood get down just because some girls don't want to go for dates with you.
Know that women won't make you happy. Never. Women are emotional, their moods are all over the place. They can change their emotions within minutes. Guys can't do that, we don't have built brains for that. You have to separate yourself from their emotions.
Confidence is a feeling. It can be dependent on something (e.g. you win some competition for which you practice long time, you step up in front of a big crowd of people and give important speech,...) or it could be independent (you just feel really confident). The Independent confidence is better, however it is much more difficult to achieve it because it is not based on anything. So learn the dependent confidence first.
IMO the best way is if a guy joins fitness and starts lifting weights. There are MANY great reasons to it: he gets healthier and stronger which will make him feel greater about himself, his self-esteem raises. He gets his hormones, testosterone and adrenaline pumping, which makes him feel better, stronger, more attractive. He learns discipline, he has to decide to go to Fitness 3 days a week, week after week, and keeps himself doing that, so he in essence learns to be leader - he decides every day, he commands every day and he does it. Fitness can actually help you with depression as well, even if indirectly - you'll get more oxygen in your brain, you get your mind off of things, you have different goals and priorities...
Say you start with bench with 60 pounds. That is great, next week he does 62 pounds, next time he does 64 and so on. Keep your track, and connect your numbers to confidence. Say your initial level is 60. Next time it is 62 or so, so let it grow. Be smart, start with LOW weights, start with not even half of your max, and simply let it grow, day after day, week after week. In no time you will raise your confidence 3-4 times higher... Do of course different exercises, squats, dead lifts, overhead, pull ups,...
Each time you basically beat your past performance - you learn to be winner, and you learns to feel great about it, which will develop a winner attitude. Your fitness will become more important than girls. Fitness will be your #1 or #2, whereas girls only #3 or #4 on the list. That is great because girls DO NOT WANT TO BE YOUR #1, they hate it (despite what they say). For the same reason, you will become more independent from girls, more secure and less needy. All of these are BIG, they generate huge attraction...
So learn to exercise your body and your MIND as well, don't just "lift weights" for muscles like every other meat head there. Let them lift weights, but you practice much more than just weights. You practice independence, winner attitude, discipline, great feelings, self-esteem and confidence... You train your MIND, not just your body...
Once you know how to do that, women can test you left and right - who cares? Let them test. You are always the same, you do always the same regardless what women do and what test they chose. You are stable and strong. You are always leader, winner, confident guy with high self esteem, a guy who is not dependent on what women think, say, test or do... They are always just silly/cute/sexy and not so important girls on your 3rd or 4th place...