This may be disappointing to you, but there is almost nothing you, as a healthy person, can do, except lending a ear and being patient.
To me, it sounds like you are/were depressed also. If you share those experiences, that may help your person feel less alone in the struggle (that helps a lot actually). It is important, when you do this, not to make it a 'competition' of pain, nor a presumption that you know what your person is feeling. If it is simply an attempt to make them feel less alone, without any other tone built in, I think it helps.
It sounds like your particular person is sexually frustrated and depressed. Although, this time loneliness was not my issue. I know what it feels like to think that I am completely undesirable and incapable of getting a date, etc. The only advice I can give is to have your person introduced to many attractive people of the opposite sex (or whatever the appropriate orientation) in low pressure, informal situations.
Lastly, I would say don't make your person, your own personal "project". I know I would feel manipulated, or feel guilty for having someone take so much time.
Also, recruit help from your person's other friends and family. I know this is a harder situation than I would take on alone. Good Luck.