OP, it sounds like your actual motive isn't to thank him, but to get back in touch with him (and thanking him is an excuse - why would you want to after how he treated you?). I've been in a similar situation and really wanted to get back in touch with the guy (under some polite pretext) for about a year afterwards - but I was well aware that this was just the fact that I wasn't over him and deep down thought that if we got back in touch, he might take me back. Yes, he cheated on me, but I was naive and, sadly, in love with this utter twerp.
I don't know what exactly you're hoping to get out of contacting your ex, but I think you should examine your motives very carefully before you do something you'll wish you hadn't later.