I assume you are talking about breaking up with a boyfriend or girlfriend. The Buddha said that the cause of suffering – any kind of suffering, including heartache – is having a deluded mind. We are all very attached to having pleasure, and very averse to pain and sorrow. This is natural. With practice and meditation, however, we can come to see that what causes suffering is not the fact that bad things happen to us, but the attachment and aversion itself. One thing you can do when you experience something painful or disturbing is try not to let your mind run away with you. Pay attention to what you are experiencing at this exact moment, rather than letting your mind fly to the past or future, and how you wish those two could be different. If you can really calm your mind enough to be really present in the present moment, you will find that it isn’t as bad as you thought it was.