"He who loves 50 people has 50 woes; he who loves no one has no woes." - Buddha
People confuse sentimental attachment with love. Attachments are needy but love is giving. When attachments are taken from you they hurt.
If you need someone else to "complete you" or make you happy, then when they leave you will feel great pain. You have to learn how to be a happy person in general to be okay with people coming and going in your life. Happy people tend to do better in relationships long term as well.