my advice would be to talk to someone about it, get it all out of your system!!
also i recommend finding a new hobby/ interest or start doing more for a hobby/interest you already pursue, putting your mental energy into something else could possibly help get your mind off of this person.
don't feel too bad if these don't exactly work for you, everyone's different and hopefully you'll find something that works best for you!!