AT ONE SALIENT point in this not uncritical but, in the main, celebratory book, Ralph Freedman shows us Hermann Hesse, his wife, and a few friends, themselves in an act of celebration. They sit down to trout, roast chicken, and unusual wines. It is December 10, 1946, and Hesse, unable to go to Stockholm to receive the Nobel Prize for Literature, is being given a quiet party at his doctor's home. When a servant enters with a tray of telegrams, all bogus, from such sources as Heaven, Mount Sinai, and Noah's Ark, Hesse briefly forgets the chronic pain in his legs. Nearly 70, he has latent leukemia, but he will last until 1962 and have a tremendous vogue among the young of the counterculture: an afterlife among acolytes.

Those telegrams, fudged up by the doctor's wife, catch the mental temper of Hesse the German who became a Swiss, the teacherly Peter Pan who hankered after things Asian and what he called "a space within ourselves in which God's voice can be heard." Grousing his way through incessant headaches and a whole series of breakdowns and marital disasters, Hesse was much more than the first well-known writer to be psychoanalyzed; as Ralph Freedman demonstrates, he quite openly used his fiction to defuse mental crises and let them fix its themes and patterns. He came, Freedman wisely reminds us, from the German tradition that uses the novel "to make music," but he updated that tradition by borrowing the tropes of his own analysts, Josef Lang and C.G. Jung.

The results were not always happy. "Your heartbeat is the hammering of my arms that long to be freed," Lang wrote to him in 1917; but Lang wasn't a professional writer, whereas Hesse was, and so could be charged, by readers less affably loyal than Freedman, with being thin, vapid, sentimental, and more concerned to let off steam than to mold the egotistical sublime into flawless prose. Afraid that analysis might end his creativity, he nonetheless seemed to think that what worked in the clinic must work in art as well, which is no doubt why much of his fiction defers to the mental events that spawned it: a by-product, a blotter, a spoor.

Align the fiction with the copiously recorded life of a Mann, a Proust, a Faulkner, and the work still dominates the life because each of the three has the gift of voluminous transposition. While the interior life waxes and wanes, a big structure begins to grow within it. Most novelists' heads are full of folk, but Hesse's wasn't, and not even the stepped-up vogue for reflexive fiction can rescue him, as it rescues Beckett, who baldly makes the pain of having a mind into his main subjectmatter, and to hell with character, scenery the rest. In the end, Hesse's parade of posed aliases only tells us that, like Kilroy, he was once there, fuming and hurting, and always wanting the opposite of what he had. For such an "antithetical mind," in Freedman's summary phrase, biography amounts to release and vindication, and this giography has him in exact focus.

The consolidated image that emerges is astonishing: that of the hero in a novel Hesse didn't write, although his magnum opus, The Glass Bead Game, that glacial continuum of futuristic repose, could have contained him whole, and should have. Given to violent temper tantrums, he seems incorrigible, and is obsessed with sin even as a small boy. After trying to shoot himself at 14, he ends up in a home for retarded and epileptic children. An egg without a shell, he longs for another revolver, but learns to repair clocks instead and goes on to work for a bookseller while grooming his neurasthenia. Insomnia frays him. He keeps aloof from his dying mother. His eyes begin to fail. Dreading ties, he marries, and fathers children. Taking a draconian cure, he sleeps on the earthen floor of a mountain hut, under a thin blanket. His Eden is the spa, where he is no longer responsible for himself. When he eventually heads for Asia, he travels first class. In a Malayan cinema he falls asleep and, when he wakes, is beating his head rhythmically on the rail in front of him. In 1914 he both supports and deplores the war.

On he wavers, massaged, given electrotherapy, beginning to paint, remarrying, living on rice, milk, macaroni, and chestnuts, psychoanalyzing his friends, churning out book reviews, absorbing and using racist jargon though married to a Jew, taking on Radio Basel, asserting his status as a Swiss citizen, rebutting postwar vilifications by Hans Habe. There was a tumult here, a marathon of paradoxes, and it's no surprise to find him saying in 1950, "How good that our life has its limits, that one is certain of the end. It is the only security in a human life which in other respects the existentialists don't understand very well."

Freedman nods occasionally ("The missionary spirit of Johannes Hesse's tracts were not to prove useful to his son") and he leaves unquestioned Hesse's assertion that, for the Catholics and Socialists opposed to Hitler, "There had been no camaraderie, not even a community of sufferers." There was, as Annedore Leber's Conscience in Revolt and Peter Hoffman's The History of the German Resistance 1933-1945 make abundantly clear. And his reading of some faces in the book's photographs is sometimes perverse, but not his reading of the long, grievous, relentlessly productive improvisation that Hesse's life was.