A scientific study conducted by the University of Michigan Medical School has shown that the brain uses a similar reaction to ease the pain of social rejection as it does to deal with pain caused by physical injury.
http://www.uofmhealth.org/news/archive/201310/opioid-social?tidrss=research