Allahumma inni auzubika minal hammi wal hazan
'I seek refuge in Allah from feeling unsettled and from sorrow.'
Put one hand on your heart or forehead and recite:
Yam hullah huma yasha'
يَمْحُواْ ٱللَّهُ مَا يَشَآءُ
'Allah effaces what He wills.'
(Qur'an Ar-Ra'd 13:39)
While reciting that phrase, make a gesture with your palm as though you are removing thoughts of her/him from your heart or mind.
What is most important is to see the hikmah (wisdom) behind the failed love affair and understand the meaning of verse 216 from Al-Baqarah that:
"It is possible that you dislike a thing which is good for you, and that you love a thing which is bad for you. But God knows, and you know not."
sumber: dari sini.