get (someone or something) out of (one's) mind
To forget or stop thinking about someone or something. Usually used in the negative. That song is so darn catchy—I can't get it out of my mind! I can't get Tom out of mind, I just miss him too much.
get someone or something out of one's mind
and get someone or something out of one's headto manage to forget someone or something; to stop thinking about or wanting someone or something. (Almost the same as put someone or something out of one's mind.) I can't get him out of my mind. Mary couldn't get the song out of her mind.