Apparently there is something called a "social attachment system" and it uses a "pain system" to discourage people from losing close relationships.
Social attachment and the pain system encourage people to keep close contact with people when they lose relationships
I suffer from a broken heart That's too bad. Broken heart is often a metaphor used for an intense emotional pain. What caused yours? I broke up with my girlfriend of four years. Oh, I see. Emotion pain if severe enough can cause actual physical damage to the heart. Yeah it is not any fun
The ''social-attachment system'' uses the ''pain system'' to encourage humans to maintain their close social relationships by causing pain when those relationships are lost.