Get (someone or something) out of one’s mind/head

To forget about someone or something.

It took me several months to get my old girlfriend out of my mind.