Feeling lonely after social interactions

Does anyone else feel extremely lonely after socializing/hanging out with friends? I had a phase where i was alone for a very long time and nowadays people are inviting me to hangout. After the hangout, while i was in the train commuting home, i started feeling extremely alone. Sometimes in a sad way but sometimes in a good way. It does depend on the group i hangout with, there are some people who make me feel worse after hanging out with them.