I'm used to being alone and much of the time enjoy it. It can be Soooooo peaceful..... I'm in control of myself and can keep everything calm and relaxing, which I really like. However, sometimes I do get lonely. Turning to a hobby or intense exercising helps me to get being alone off my mind. Whatever you do, do NOT, focus on it. Do NOT start thinking, my me, why am I alone, being alone sucks, etc, etc. That self talk will only intensify the lonely thoughts and feelings. You want to jolt your body/mind onto a better more healthy track.
You might also want to try an exercise to make it easier. Get out a clean piece of paper. Write down all the negative lonely thoughts you are having. When you get them all on paper, rip it up, and throw it into the trash. Consider that matter finished and immediately move on to doing something else, anything else.
Since you have a partner you can think about and do something special for them that they will really like and/or appreciate. Hopefully that will make you smile thinking about them. Then when they return you can enjoy your efforts with them which is doubly rewarding. They'll appreciate it and it will make your relationship stronger.
Or, you can try meditation. After you get constant rythmic breathing imagine targeting the lonely thoughts in your mind. You find them and imagine that they are traveling through your body and into your lungs where they are being exhauled out of your body. Then you imagine your are breathing in healthy, clean, fresh air. Keep doing that until all the negative / lonely feelings are out of your mind. Then imagine and realize how much better you are feeling. Your body will follow your mind. It's not a one way street. Then get up and do something else, anything else. Maybe try making a healthy smoothy or something fun that you've never done before. Try to connect meditating to be fun and rewarding. It will take time and effort. But, when you are alone you have plenty of that. So, use it to help yourself.
After you do that a bunch of times, it will feel more natural. Lonelyness will pop into your mind. It definitely does mine. I don't think you can stop that. I can't. It's natural to feel sad and want to cry. Sometimes, it might be good to cry a little bit too because it will help get the crap out of your body.
You can control how much you want the lonelyness thoughts to be in your mind. Remember you are in control and tell yourself that. Now go do something fun or watch a fun comedy and laugh. You will feel better.