Great sorrows are mourned in five stages: denial, anger, bargaining, depression and, finally, acceptance.

London – in the dark wake of a break-up, many people believe the pain of rejection will never end.

But now, scientists have discovered there is light at the end of the tunnel, claiming humans are actually ‘hardwired’ to overcome heartbreak and find new love.

The research shows people are programmed to get over romantic break-ups and move on to new relationships.

Scientists examined the process of falling out of love and breaking up - which they call ‘primary mate ejection’ – and moving on to develop a new romantic relationship, which they call ‘secondary mate ejection’.

Dr Brian Boutwell, of Saint Louis University, said: ‘Our review of the literature suggests we have a mechanism in our brains designed by natural selection to pull us through a very tumultuous time in our lives. It suggests people will recover; the pain will go away with time. There will be a light at the end of the tunnel.’

Drawing largely on the field of evolutionary psychology, the researchers said men and women might break up for different reasons.

For instance, a man is more likely to end a relationship because a woman has had a sexual relationship with another man. Dr Boutwell said that, for evolutionary reasons, men are wired to try and avoid raising children that aren’t genetically their own.

He added: ‘Men are particularly sensitive to sexual infidelity between their partner and someone else. That’s not to say women don’t get jealous, they certainly do, but it’s especially acute for men regarding sexual infidelity.’

On the other hand, he said a woman may be more likely to break up if her partner has been emotionally unfaithful - partly because of evolutionary reasons. Women have evolved to value the resources that their mates provide, such as help in raising or physical protection. They tend to reject mates who threaten to take these resources away, and might fear emotional infidelity is a sign of this happening.

Dr Boutwell said that sometimes both men and women end a relationship for the same reason, adding: ‘For instance, neither gender tends to tolerate or value cruelty on the part of their partner.’

Brain imaging studies of men and women who claimed to be deeply in love also provided important clues about dealing with break-ups. MRI scans showed an increase in neuronal activity in the parts of the brain - the pleasure areas - that also become active with cocaine use.

Dr Boutwell said falling out of love might be compared to asking a cocaine addict to break his or her habit, adding: ‘To sever that bond and move on is a huge ask of a person. Ultimately, trying to move on from a former mate may be similar in some ways to an attempt at breaking a drug habit.’

He examined studies about the brains of former cocaine addicts to try to predict how the brains of those who are breaking a relationship habit might look.

Images of the brains of those no longer using cocaine showed a larger volume of gray matter in various brain regions, which were markedly different from images of brains of active cocaine users.

Mr Boutwell said: ‘We might argue that different regions of the brain act in a way that once that addiction has been severed, then help to facilitate a person moving on and finding a new partner. A person might initially pursue their old mate - in an attempt to win back their affection.

‘However, if pursuit is indeed fruitless, then the brains of individuals may act to correct certain emotions and behaviours, paving the way for people to become attracted to new mates and form new relationships.’

Dr Boutwell urged more research into lost love to better understand the difficulties that can creep into a romantic relationship.

He said: ‘If we better understand mate ejection, it may offer direct and actionable insight into ways in which couples can save a relationship that might otherwise come to a stultifying and abrupt halt.’

The study was published in the Review of General Psychology journal.