How do you feel about fictional characters who are obviously closely based on the author? Is this an example of authorial superego? Or just a natural extension of the "write what you know" advice?
Both proposed answer to this question are valid. There are a bunch of author, mainly European ones whose autofiction/depressed writer protagonist are just extension of themselves solving their personal issues with their lives in a barely fictional universe. Michel Houellebecq and Fred Beigbeder for example. Sometimes it works, like in Beigbeder's 99 FRANCS, but sometimes it's just pointless nihilism like in Houellebecq's WHATEVER *. Needless to say, I'm not a fan of the contemporary french writers. I'm not used to many American writers being this way because...well...I don't read them, I've learned my lesson with that sort of novels, but to my experience Philip Roth is a little like that. I don't want to spread myself too thin about him, because I haven't read him much, though. Best autofiction novel I've ever read is from Quebec writer François Avard. It's titled POUR DE VRAI? Which could be translated as FOR REAL?, but I doubt it will ever see the light of day in English translation. It's sad because it's a great, playful novel. It has gripping honesty and yet it doesn't take itself too seriously.
That said, I've read a tiny little novella last Winter, titled EVERY SHALLOW CUT, by a writer named Tom Piccirilli and I liked it so much I selected it for my Spring book club. It's the story of a failing writer having a nervous breakdown. It's based on Piccirilli and not at the same time. He's having his next novel published by Bantam Books **, so he's obviously not in dire straits like the namesless protagonist of EVERY SHALLOW CUT is, but please, read this essay he wrote for Big Click Magazine or this one he published on his blog. The writing is similar. The problems are also. They're not as bad, but they are there. What I think happened is that Piccirilli selflessly swept himself aside and let his worst fears loose on paper. No ego, no Godlike fantasies. Just pure, crippling fear. That makes him one of the most powerful writers alive today. So yeah, Piccirilli wrote what he knew in EVERY SHALLOW CUT. He always does that. He writes the darkness welling up inside of him. That's why I can relate so much to what he writes. But really, read the two essays I posted links to. You will thank me.
Finally, I just want to add one thing. And please, don't take that as an attempt to sell you a status I do not have. But I have been (with very humble success) writing myself for a few years now. I find that writing reality is a double edged sword. It's too easy to let your ego take over when you do that and end up writing crap. The best things I've ever written were when I took the backseat and the words seem to flow from somewhere else. I'm a believer in the muse. That you have to tune yourself out of the equation to get a story on paper. But it's just an opinion. Not necessarily a reality. There's no ultimate truth when it comes to writing. You just have to find the winning recipe for yourself.
* To his defense, that was his first novel.
** An imprint of Random House