Whether or not you forget about your ex is between you and your heart, but if you continue to bring up your ex or contact him, you will risk your current relationship, so if you don’t want to do that, change your behavior. It’s really that simple.
It sounds like your ex has made it very clear that he doesn’t want to be with you any more, and is involved with another woman, so I’m not sure if you’re pining after something you can’t have because you miss him or because you’re trying to sabotage your current relationship. Dating a man for four years without a commitment is too long, and unless there’s a really good reason for him stringing you along, you should probably consider dating other people. Your pining after an unavailable ex may be your heart telling you this relationship you’re currently in isn’t right for you.
I hope that helps. 🙂