Try some visual stimulation that might sidetrack your mind. Sounds weird, but bare with me here. Think of something that you really really like, that doesn't remind you of your ex, and get a poster of it and hang it on your ceiling, so that you just think of that when your eyes open and you look up at it.
Might not work for you, but it has been known to work