Watching a tear jerking film helps in social bonding, say researchers.
The finding could explain our attraction to dramatic works of fiction - even if they make us cry.
Experiments by an Oxford University team suggest tragic films and other dramatic works trigger a rush of feel-good chemicals known as endorphins.
This acts as a natural painkiller and helps us bond with the people around us, they report in the Royal Society journal Open Science.
The human fascination with story telling was forged in ancient times when we began to live in hunter gatherer communities, said Prof Robin Dunbar, who led the research.
Enjoying fiction is a hallmark of human society, but until now scientists have not investigated its evolutionary basis.
"Fiction is widely studied by humanities academics as it is an important feature of human society, common to all cultures," said Robin Dunbar, professor of evolutionary psychology at Oxford University.
"Yet the reasons why fiction can be so engrossing and the functions for this have not been widely studied by psychologists or behavioural biologists.
"There are good social reasons: folklore enables us to pass on wisdom or ingrain community values, bringing us together. While that is important, it does not fully explain why we are willing to return again and again to be entertained."
An Oxford team of scientists, psychologists and classicists decided to test whether drama triggers the release of endorphins - chemicals that act in the brain to dull pain.
They showed volunteers the film Stuart: A Life Backwards, the dramatised story of a homeless man with a troubled childhood.
A second group watched documentaries about neutral subjects.
The team tested changes in pain threshold before and after viewing the films as a measure for endorphin release using the wall-sit test.
This is where someone rests their back against the wall as if they were sitting on a chair and holds it for as long as possible.
"Those who had the greatest emotional response also had the greatest increase in pain threshold and the greater their sense of being bonded with their group," said Prof Dunbar.
He thinks our affinity for emotive fiction may have evolved in the context of cohesion of social groups, as the endorphin effect has also been seen in comedy, singing and dancing.
"This is not to say that this one chemical effect alone is the only reason for dramatic fiction - there are other aspects of human psychology at work - but we believe that it is an important reason for our enjoyment of fiction," he added.
The research was an unusual collaboration of researchers from the fields of arts and science.
Dr Sophie Duncan, a Shakespeare scholar, said they wanted to understand how and why fiction works and the meaning of ''getting lost in a book''.
The study shows ''you can give yourself an endorphin high through fiction'', she said.
''Watching tragic drama is good for you - it's good for our health,'' she told BBC News.
''It boosts endorphins which are our body's natural painkiller.''