First off let me say that I'm sorry for your breakup. Being close friends and trying out a relationship can and often times does end messy when it ends.
I personally masturbate a lot when I'm angry or upset. It puts me in a much better mood. Did I masturbate when I was younger and a boyfriend/girlfriend broke up with me? Hell yeah. Did I feel bad about it? Not one bit. Why? Because well, we broke up for a reason. Generally for good reasons. If I felt that there wasn't a chance at us getting back together, then I went ahead and took care of myself.
You shouldn't feel bad for doing this. You also shouldn't feel bad for watching porn. My biggest flaw with relationships when I was younger was putting emotional value to too many materialistic things or something as simple as a tv show, a video game or a particular song.
Don't let this break up ruin porn for you. Don't think about your ex POSSIBLY doing it with someone else, think about the hot piece of ass that's fucking on your screen for YOUR pleasure
Things will get better, Darlin'.