I'm very sorry about your situation. Its nice to see that forum is so responsive in such a positive manner. I think everyone has been lonely for a period of his/her life, and its very easy to understand what sucks so much about it.
I don't think anyone has perfect advice, myself included, but you definately have to do something. Don't let yourself get stuck in a rut where you are just as miserable today as you were yesterday. GO OUT. Don't sit at your computer, as tempting as it might be, that's not going to improve your social situation.
Here's what I found in college that transformed me from a kinda lonely guy into someone I can say I am happy to be.
1. Get in close proximety to likeminded individuals. Living with my peers was very helpful when it came to meeting new people and actually getting out. Move somewhere that might have a lot of individuals who share your interets and are in your age/income group. You can't help but run into and talk to your neighbors every now and then, and often times they are good people.
2. Find hobbies. Get out there and do something. Dancing is a great start, but keep looking. I am sure you would've never found an interest in dancing without your (ex)wife. There are probably plenty of other things out there that suit you, that you could find yourself getting engrossed in. Do something out of the ordinary, skydive, smoke pot, go crazy. Don't become stagnant. If you share someone else's passion, they are instantly going to have a connection with you.
3. Put the computer away. Its important for work, but its not going to make you happy, its not going to take the place of friends either.
4. Don't rush yourself. Change takes a lot of time, and you can't help but feel down now and then. That doesn't mean things aren't going to get better. Smile, do the things you know you enjoy most when you get down, and don't let it get to you all the time.
5. Get professional help. There are a lot of people with the letters M.D. or PhD after their name that know how to help you a lot better than yourself or any of us. Drugs might be an answer too, but not a permanent one.
I dunno, there's probably more stuff that I am forgetting, but that's the gyst of what I was thinking. Don't let negative feelings, anger, bitterness, etc... take you over. They are very unappealing to any new people you might meet, and will turn you into a generally unpleasent person. You don't seem too overcome by anything like that, your online demeanor seems generally positive for your negative situation. You are a nice guy, there's no reason people shouldn't like you, so say hi, shake some hands, and let your prescense be known! It can't hurt to try, rejection is something we all face at one time or another, don't fear it.
And if you want, give me a call. PM me and I'd be happy to give you my phone number, or just PM me. A lot of people care, even if they haven't met you face to face.
There's no good reason to be lonely for long in this life, but it happens far too often. Don't let it happen to you and keep us updated.