Eternal Sunshine of the Spotless Mind

Joel Barish, heartbroken that his girlfriend underwent a procedure to erase him from her memory, decides to do the same. However, as he watches his memories of her fade away, he realises that he still loves her, and may be too late to correct his mistake.
You can erase someone from your mind. Getting them out of your heart is another story.