Dini was already an acclaimed writer when he was brutally attacked and nearly killed in a mugging. His injuries weren't just physical - in addition to his skull broken in multiple places, he was deeply traumatized by the attack and spiraled into a frightening depression.
But Batman understands because he's got a dark side, too, and he doesn't let it rule him. He's still on the side of good, and Batman helps Dini see that he can beat back the nightmares by doing what he's always done: writing good stories for great characters.
This is a fantastic way to tell this specific story - since most of the action takes place inside Dini's head, his thoughts and hallucinations are vividly depicted as appropriately twisted comic book characters. It's dark, but also hopeful and very well done.