The only way I do, Is I have my dogs. Without them I'm not sure what I would do. But nothing but time helps. And even then we still get lonely, we just notice we don't think of it as much. Stay busy helps.
You figure out who you are now. You need to find that individual who was smart, confident and full of life. Once you find her than those lonely nights will get easier. Until then relax with a movie, music, find a hobby or just chat with other people in the same situation. It will get easier just not right away it take time