['I went to visit my family for four weeks. Now that I am back home, I feel lonely.', 'I would imagine so.  It is difficult to be away from family for long.', 'I will try get out with friends to feel less lonely.']
That would probably do the trick.  If not, video call your family to touch base more often?
I went to visit my family for four weeks. Now that I am back home, I feel lonely.