In order to fix a broken heart, the missing virtue must be returned to the heart. To do so, one must first find a person with an abundance of such virtue and cast the Take Heart spell on them. The laws of Ni no Kuni, metaphysical or otherwise, state that you must only take virtues from those who have plenty to spare, lest they become heartbroken as well. Also, you must ask for permission before doing so, it's only polite, given how you're essentially ripping out a portion of their soul. The accumulated virtue will sit inside whatever repository one has for it, such as a Locket, until the Give Heart spell is cast to place the virtue in another's heart.