One of the worst parts of breaking up is losing your mind.  Literally. 
Maybe not quite that literally
Source
Let us back up for a second and discuss what happens when people form relationships.  No matter what kind of relationship we’re talking about, whether it’s a dating couple or a team at work, people who spend time together develop something called transactive memory.  
Technically, transactive memory is simply the system through which groups encode, store, and retrieve knowledge.  The interesting thing about transactive memory is that it is potentially greater, more complex, and more effective than the individual memories of anyone involved in the group.
Let’s imagine a couple, for example, with a fairly varied set of interests.  Pat works in the medical field while Max works in publishing.  It makes sense that when Max has a medical question Pat is consulted, just as it makes sense that Max wouldn’t feel the need to remember any medical information.  After all, that’s Pat’s area of expertise.  The same holds true for Pat and anything related to books or publishing.   
However inefficient, they both remember how much they want to murder the giggling couple from the beach.
Source
But it’s not just business expertise that comes into play.  Let us say that Max is gregarious and tends to spend a lot of time keeping up with friends on the phone, or by letters and cards.  When Pat needs some information about their friends it makes sense to simply ask Max rather than trying to remember it.  
Families and couples do this naturally.  It’s simply more efficient to have one member of a group be in charge of knowing how to reprogram the VCR, or the date of the annual family get-together.  And the longer a group is working together the deeper the system of encoding and remembering goes, soon each member of the group knows explicitly which bits of knowledge should be passed to which member, and where their individual questions should be directed.  This means that even new information can be encoded and remembered much more efficiently than it could on an individual basis.
Problems arise when everyone thinks someone else is in charge of remembering the video game passwords
Source
 Daniel M. Wegner, a professor of psychology at Harvard University tested this memory system by taking 59 couples and either allowing them to stay together or splitting them up to work with strangers.  They were then aksed to read 64 statements and asked to write down as many as they could remember.  Those pairs that knew each other remembered significantly more statements than those that didn’t.  
Some couples worked better than others
Source
 According to Wegner, people who are in a relationship for some time develop a joint memory system that is organized by remembering who has the best understanding of the issue at hand.  “Relationship development is often understood as a process of mutual self-disclosure.  Although it is probably more romantic to cast this process as one of interpersonal revelation and acceptance, it can also be appreciated as a necessary precursor to transactive memory.”
But what happens when you develop a transactive memory and suddenly lose one of the members of the group?  Say, in a long-term couple that suddenly gets divorced or breaks up?  Well, it is fairly equivalent to losing a part of your mind.  All of those memories which you externally stored in the other person are no longer yours to call on.  
Wegner expands on this idea in his work.

 

“Divorced people who suffer depression and complain of cognitive dysfunction may be expressing the loss of their external memory systems.  They, once were able to discuss their experiences to reach a shared understanding…. They once could count on access to a wide range of storage in their partner, and this, too, is gone…. The loss of transactive memory feels like losing a part of one’s own mind.”
With this in mind the helplessness and feeling of loss after a breakup makes even more sense.  It’s not just the person that you’re mourning for, you’re actually experiencing a loss of all the knowledge and information that you had stored in the other person.  
WHERE DO WE KEEP THE JONES FILE?!
Source

It also partially explains the feeling of loss that people feel when they find themselves suddenly untethered from the internet.  More and more in our modern society we find that it doesn’t make any sense to remember the name of the movie actress in a specific movie, not when we have access to IMDB.  Nor is it all that important to remember individual phone numbers when we have contact lists in our phones. 

In fact, research published in Science Magazine on the July, 14 2011 suggests that when people think that they’ll have future access to information through the internet they don’t remember the information at the same rates, but they do remember how to get to that information much better than usual.  It seems that the internet is becoming a transactive memory for individuals, where we no longer remember the information in particular but rather the best way to find it. 
Which is fine as long as we have service on our smart phones. 
Nope.
Source