I understand. I've been lonely too. I think most if not all people have.
This is why being alone is only going to make you feel more lonely.
You need distractions in your life. But more than that, you need to live your life. There is more out there than romantic love. Which is wonderful, but it shouldn't be the only thing to make you happy.
Go to a class. Volunteer. Call friends. Hook a rug. Go to a shelter and hug some puppies and kittens. Hit the gym. Take a walk. Drive some place you've never been to before. Cook a new recipe.
All of these things have one big thing in common. They aren't dwelling on loneliness.
If it's impossible, and so hard that these things don't make a difference, then call your doctor.