How can you get someone out of your mind?

There is this girl, we work together, and every time I see her my worries cease. She is such a lovely person and I can't get her out of my mind. However she is seeing someone else and is pregnant. She seems happy, but at work sometimes I feel as if there is something between us. However, I now realize I have to move on. The entire situation has made me spiral into depression and I no longer have any hope or motivation. I just need her to get out of my head.
How can you get someone out of your mind?
Post Opinion