The writer-director team of Anna Boden and Ryan Fleck, formerly of Half Nelson and Sugar, here adapts Ned Vizzini’s autobiographical novel. A suicide-curious teenager (Keir Gilchrist) spends five days in the psych ward and comes away with an oddball mentor (Zach Galifianakis), a possible girlfriend (Emma Roberts), and just enough confidence and perspective to keep on keeping on. Who knew mental illness could be so drolly benevolent? To watch this is to feel like a shrink building rapport with a patient on the couch — tolerating tics, gathering affection, drawing conclusions. Boden and Fleck have a real knack for compassionate character development, and it’s kind of a shameful story to see that gift get cluttered up with gimmicky indie-formula storytelling. But their movie has a core of pleasurable performances, particularly from the affectingly subdued Galifianakis and the receptive Gilchrist.