First of all, figure out what it is you want. If a magic fairy could wave her wand and make everything involving your man and your ex just the way you want it, what would that outcome be? Get that scenario firmly in your mind.
Now erase the fairy. Keeping in mind that the only person you can control is yourself, what actions can you take that are most likely to make that scenario come true?
Sometimes we can't have exactly what we want because other people do not cooperate with our plans. But you'll never get what you want if you're not sure what you want and keep making wild guesses at what actions might make you happy.
Remember the golden rule: treat others as you want to be treated. And remember the platinum rule: treat others as THEY want to be treated.