Try this!

Change your ringtone and text message alert.

Here's why, it's human nature to associate sounds with feelings. How often have you heard a song that takes you back? Same idea with ringtones.

So, since your ex probably called you and texted you more than anyone else, your ringtone and text alert will make you immediately think of them. It's an emotional snow ball of pity after that, leading to you being really angry and depressed.

Get rid of that trigger and switch sounds.

Side note: Ever put your favorite song as your ringtone only to then HATE it because you now associate with your phone disturbing you?