Rachel didn't actually mess up the wedding though, she only went to it. He said it because he was still hung up and in love with her while he was about to marry someone else. That was entirely his fault.
Dude has a laundry list of personal relationship fuck ups that he doesn't really learn from and instead spirals into self loathing.
Nah. She shows up and tells him that she just HAS to tell him something... then chickens out at the last moment with, "umm congratulations." It was completely obvious what she was going to say and that screwed with his head in a major way.