Realize that you have to reach a point of wanting to get over your ex.
Cut off all communication with your ex.
Harsh, but it's the only thing that works. You probably feel like you're losing the best friend you ever had, the only person who truly understood you. It might hurt at first, but it will get better. You cannot be friends while you attempt to get over each other.