Mary Sue
I think wish fulfillment characters can be horrid, but I don't think Mary Sue characters have anything at all to do with writers putting themselves into the fiction. A Mary Sue character isn't the writer, it's someone the writer would like to be, but isn't, doing things the writer would like to do, but can't. A very, very different thing.
I suppose a writer who has really done little or nothing exciting, who has lived a dull, boring, life, might well use a character as someone to live through vicariously, to fulfill the writer's fantasies. But that character isn't the writer in any sense.
The writers who build protagonists I love best are almost invariably people who have been there and done that, who have lived lives as exciting as that of the protagonist. Experience does add realism. It's much easier to write realistically about something you've experienced yourself, just as it's much easier to write realistically about love and hate if you've been in love or hated someone.
If you've actually been in a firefight, if you've been shot, if you've killed, if you've looked down the barrel of a large caliber handgun at close range, it can help in the writing. Unfortunately, it also spoils a lot of reading because when the writer gets it wrong, you know it. And writers get it wrong far too often.
We all put more than a little of ourselves into characters, whether we mean to or not, but there's a right way and a wrong way to do this. The wrong way is with a wish fulfillment chracter. The right way is to put yourself in as a real person with the same limitations, weaknesses, etc. all real people have.
I'd also say, however, that while critics and reviewers and other writers usually hate Mary Sue characters, the public, unfortunately, seems to love them.