The most famous instance of this in anime is Hideaki Anno and Neon Genesis Evangelion. The latter half of that show and the subsequent movies are a testament to his depression and conflict with the otaku lifestyle at the time; in the end, all of that eventually merged with Gainax's serious financial difficulties to create the infamous, dark and Mind Screwing last two episodes.
Which is interesting because the first half of the show was created off of the depression, but the latter half was made while he was in therapy.
And it shows. The first half is moody, but it's quiet moody - the "I've got problems and I don't want to talk about them" moody. Shinji in particular is a depressed, quiet, emotionless blob for the first half. Then comes the second half, where Anno starts his therapy sessions. Shinji becomes suddenly competent and gets eaten twice. Asuka gets mindraped. Rei's emotional development is undone. Misato finally rekindles her romance with Kaji only to have him shot the next episode and spends the rest of the series crying. It's like all the bottled emotion in the first half gets let loose in the second. And then there's the movie, which was essentially a massive Take That to the Fan Dumb.
FLCL was then reportedly created by Kazuya Tsurumaki as a vacation for the staff afterwards — Anno's only contribution to the series was providing the voice of a non-anthropomorphic cat. Some people even consider this to be too much.
Interestingly, this trope is inverted in Rebuild of Evangelion. Hideaki Anno is a much different man than he used to be years ago, and now that he is not only sane, but also happily married and the director of one of Japan's most successful franchises ever, the characters are slightly saner and braver (especially Shinji), and the series' general tone seems to hold a "Light at the end of the tunnel (Somewhere past the train)" mentality. It is rumored that the new movies will end in a different way when compared to the (in)famous past movie...
The visit to the sealife preserve alone was enough to create some distance from the original series. Where the first series was largely dominated by the fatalism of Seele and Gendo, the very existence of the preserve and the hopes of one day using it to repopulate the seas shows more human spirit in ten minutes than we saw in most of the original. That being said, the new films are NOT lighter and softer by any means have can and do go into territory just as dark, if not darker than the original. Basically Anno sane just meant that while the characters are more stable, the story is not.
The most obvious comparison is the way females are treated in Victory Gundam, and the way they are treated in ∀ Gundam which was made after the depression. In Victory Gundam, even the toughest and more competent women are killed more or less regularly, while in Turn A, they are usually shown as just as bold, strong, and caring... but two of them are competent pilots despite using grunt suits not made for land, and they all survive.
Also, like Anno, he remade Zeta Gundam into a movie series but with a better ending after he got over his depression.
A couple of years before Bleach, its author Tite Kubo had another series titled Zombie Powder, which only lasted four volumes. The series was canceled because of its low popularity, but a nervous breakdown the author had also influenced in the decision. Kubo himself acknowledged it, in a veiled manner, in the flaps on the last volume published. A number of fans seem to believe this is the reason why Bleach is the way it is. Zombie Powder was far darker, had western themes (and guns), a smaller cast and people died. Bleach, on the other hand, has Japanese themes, a massive cast and the fan meme"Nobody dies in ''Bleach''" (which has been subverted lately, to a degree). On the other hand, Bleach is also notable for its frequent Angst.
In-Universe example: In Princess Tutu, Drosselmeyer traps the entire town of Kinkan in a story after the villagers began to fear his story-turning-into-reality powers and cut off his hands. That story? Written with his own blood from the stumps of his arms where his hands were cut off. Which, of course, explains why the man is so insane and obsessed with tragedy.
The author of Bitter Virgin, Kusunoki Kei, explains that a character's stillborn child in the story was... inspired seems the wrong word here... that she wrote about this, after her own miscarriage. As it is often with Creator Breakdowns, the writing has emotional honesty and power, which stands out in the story's somewhat melodramatic tone.
In-Universe example: Yoshino of CLANNAD. Meeting a group of kids in a hospital that are fans of his music made him question his singing for his own sake, preventing him from writing new songs. Then, when the biggest of said fans committed a huge crime, he blamed himself and let that bitterness crawl into his work. It eventually led to a downward spiral where he left the music scene a broken man.
Osamu Tezuka's, in the wake of personal betrayal, having his manga altered in serialization and anime adaptations, and health problems. His stories always had a certain 'edge', but you can see him subverting and deconstructing the ever living life out of some of his previously innocent characters and archetypes. The most blatant product of this is Alabaster.
A particularly ugly and recent, messy example for Kentarou Yabuki, the creator of Black Cat and illustrator for To Love-Ru. The cancellation of the latter manga was abrupt due to his recent divorce. It's not exactly easy to continue writing a story of the sweet and lovely Girl Next Door when the woman she's based on has just had an extremely ugly breakup with you.
Which is a double shame considering the writer of the manga didn't base the character on the ex-wife, making one wonder how the story would have turned out if he had hired a different illustrator with a more happy and stable family life.
After a lot of drama, a sequel series has been established with both the original writer and the original artist. Said sequel series almost picks up where the original left off. You may jump for joy now.
On a more humorous note, it's been joked (and outright stated) by the anime staff that the reason the amount of fanservice spiked upward was because of Oda getting married to Chiaki and being horny for her all the time (dude, she's a gorgeousCosplay Otaku Girl) - and to the displeasure of fans who liked the general lack of such things in the manga early on. For a guy who prefers not emphasizing romance that's not an obvious huge joke in his stories, he sure is a massive softie for his family.
In-universe example in Bakuman。. Ryu Shizuka, author of "True Human" (a manga about the conflict between the "true humans" and the normal "old" humans), kills off all the human males and focuses the story around the young women serving the "true humans" around the time he starts going to cabaret clubs and socializing with the hostesses. His editor takes him to a tea date with Aoki and her assistants, along with Hiramaru and his editor, which turns out to be quite awkward due to Shizuka's poor social skills and gloomy demeanor. Shizuka realizes that the hostesses were only paying attention to him for money, and plans on writing about their false love in "True Human".
Apparently, one of the reasons why the Gundam SEED movie is in Development Hell is the very serious illness (which was unspecified) that affects Chiaki Morosawa, head script writer and wife to director Mitsuo Fukuda.
More of a fanwork example, but the doujinshi Takotsuboya K-ON Trilogy involves Azusa being unable to find success as a musician, Mio being extremely jealous at Yui for her success, and Ritsu resigning herself to a low level job because she believes she lacks talent. All of these can apply to the creator, TK, who tried for decades to become a published mangaka, but never could.
In 2006, Nitro+' Gen Urobuchi confessed in his afterword to the first volume of Fate/zero to a loss in the ability to write heartwarming stories and a "tragedy syndrome" which compels him to make things tragic for the characters he conceived. Such tendencies showed up in spades in Fate/zero, which was a much darker prequel of Fate/stay night, and then, in 2011, in Puella Magi Madoka Magica. Judging by the Bittersweet Ending of that anime though, he appears to have gotten better, though it's up to the individual's thought of whether or not he's fully recovered judging from hisrecentworks.
In 1972, Go Nagai released 2 manga around the same time: Devilman and Mazinger Z. The former was something that he considered to be his greatest work, while the latter's popularity heavily overshadowed it at the time. Toward the end of Devilman, his depression got the better of him and left the series with an ending that would put Anno to shame. Amusingly, the series became much more popular after its run finished.
A Fan Sub example: the final two episodes of LIME Anime's subtitles of Ichigo 100% begin with detrimental messages from the subber: "We recommend you stop watching now! Please watch something else!" on Episode 11, and "Why did you download this? It sucks!" on Episode 12.
Cat Soup was based on the works of a female underground manga artist called Nekojirou. This independent manga artist made, along with her husband, a lot of really dark, twisted and weird stories in which the hate for society and culture in general where very common. And then, in 1993, Nekojirou commited suicide under really mysterious causes, and that very same year, an anime based on her works, called Nekojirou Gekijou, was broadcasted on japanese television in the form of 26 short animated sketches, portraying that very crude humor and disgust for society in general.