The track from her 2010 album Speak Now was allegedly written about him by Swift after their brief relationship had ended.
Mayer explained that he was "humiliated" by the track, and said that it was a "lousy thing to do".
"It made me feel terrible," he told Rolling Stone. "Because I didn't deserve it. I'm pretty good at taking accountability now, and I never did anything to deserve that. It was a really lousy thing for her to do."
Lyrics in the track include: "Dear John, I see it all, now it was wrong. Don't you think 19 is too young to be played by your dark twisted games, when I loved you so."
Mayer added that he was unaware of her true feelings for him following their relationship until he heard the song.
"I never got an email. I never got a phone call," he said. "I was really caught off-guard, and it really humiliated me at a time when I'd already been dressed down.
"I mean, how would you feel if, at the lowest you've ever been, someone kicked you even lower?"
He further criticised Swift by describing her songwriting inspired by her personal life as "cheap" and "bulls**t".
"I will say as a songwriter that I think it's kind of cheap songwriting. I know she's the biggest thing in the world, and I'm not trying to sink anybody's ship, but I think it's abusing your talent to rub your hands together and go, 'Wait till he gets a load of this!' That's bulls**t."
Swift had previously said of the song: "'Dear John' is sort of like the last email you would ever send to someone that you used to be in a relationship with. Usually people write this venting last email to someone and they say everything that they want to say to that person, and then they usually don't send it. I guess by putting this song on the album I am pushing 'send'."
John Mayer recently admitted that comments he had made in the past about ex-girlfriends Jennifer Aniston and Jessica Simpson were "garbage".