There is nothing wrong with feeling lonely. It might be painful but pain is a part of life. Imagine if you never felt alone in your whole life how could you empathize with other lonely people?
Loneliness like every other emotion is just a passing feeling. Like rain clouds they come and go and sunshine will come eventually and the pain of feeling lonely will pass.