When relationships end, many of us resort to social networks to discover what our exes are up to and who they're with in the hope they are unhappy without us.
But this so-called Facebook 'stalking' can leave lasting damage by prolonging the distress, and it can even affect our future relationships.
In particular, the behaviour creates a cycle in which the site is used for reassurance, but ultimately makes us feel worse about the situation which makes us seek out further reassurance.
The findings were made by Dr Jesse Fox from the Ohio State University and her colleagues.
Participants in the study, including 150 male and 281 female Facebook users aged 18 to 42, were surveyed on their attachment style, how invested they are in relationships, whether they use social networks to look for 'alternatives', if they'd ever 'stalked' exes on Facebook, and who ended their last relationship.
The researchers were particularly looking to study the interdependence theory.
This suggests that two conditions predict how committed someone is in a relationship - dependence and 'quality of alternatives.'
Dependence refers to the extent at which a person's needs are being met by the relationship, while the 'quality of alternatives' refers to how much a person keeps their options open while in that relationship.
Investment size refers to the amount and value of effort being put into the relationship, including how intimate a couple is, whether they have shared friends, and money.
While commitment level refers to how devoted a person feels to their partner.
The study said that people who develop what's known as an anxious attachment style as children are more insecure about their adult relationships and constantly question their partner's intent to stay in the relationship.
These people are then more likely to use sites such as Facebook to explore alternatives, even if they're highly invested in their current relationship.
Individuals high in so-called attachment avoidance also express interest in finding alternative options, and use Facebook to do so.
But 'avoidants' tend to share less resources in a relationship, so they are not as highly invested.
This makes them potentially less committed than the anxious attachment group.
Unsurprisingly, the study found that people who were more committed in relationships had higher levels of emotional distress following a breakup.
This in turn makes them more likely to look for coping mechanisms, including 'stalking' their ex on social networks - officially known as interpersonal electronic surveillance (IES).
The study found this trend is more noticeable if the person doing the stalking was the one who was dumped, rather than the one who did the dumping.
But this surveillance prolongs the distress.
Seeing an ex-partner flirting with other people, or changing their relationship status, triggers negative feelings, which leads them to seek a coping mechanism and the cycle is repeated.
Such behaviour can also make it harder for the 'stalker' to recover from the breakup, which may lead to more problems in future relationships.
'Distress following a breakup, particularly for those who felt they were in committed relationships, initiates a series of healthy and unhealthy coping mechanisms, 'explained the researchers.
'One such coping mechanism conventionally used in the wake of a breakup is surveillance, and individuals often turn to social networks to gather this information.
'Therefore, it is predicted that distress will be positively associated with online surveillance of the former romantic partner immediately following the breakup, especially if the individual did not initiate the breakup, and this surveillance will also be related to their current surveillance.
Brenda Wiederhold from the Interactive Media Institute, San Diego added: 'Since stress may trigger problematic internet use, psychologists may wish to assess for increased usage by their patients during periods of stress, such as a relationship's dissolution.'
The paper 'Romantic Partner Monitoring after Breakups: Attachment, Dependence, Distress, and Post-Dissolution Online Surveillance via Social Networking Sites' is published in the journal Cyberpsychology, Behavior, and Social Networking.