The Mark Twain many Americans read about in textbooks is, more or less, a literary superman. He wears a white suit; he pals around with Ulysses S. Grant; he tosses off chestnuts profound (“Lincoln’s proclamation … not only set the black slaves free, but set the white man free also”) and ridiculous (“Always respect your superiors; if you have any”); he’s the man called America’s first modern celebrity. The creator of the now-controversial masterpiece “The Adventures of Huckleberry Finn” — love it or hate it — is cool, confident and collected.

But very different adjectives apply to the Twain seen in writings from 1865 and 1866 pieced together by scholars: broke and suicidal.

“If I do not get out of debt in three months — pistols or poison for one — exit me,” Twain wrote in 1865 in a little-known letter to his brother. The letter is among many works “recently uncovered, authenticated and promulgated upon the public,” as SFGate put it, at the University of California at Berkeley.

“He was in the middle of an identity crisis,” Bob Hirst, editor of the Mark Twain Project at Berkeley, told SFGate, the sister site to the San Francisco Chronicle. “He was facing debt and had not embraced his talent. He was tormented by it. He was drinking too much and didn’t know what to do with himself. He thought humor was literature of a low order.”

Much of Twain’s writing in this period came in the form of “letters” — columns of about 2,000 words each written from his home in San Francisco to the Territorial Enterprise newspaper in Virginia City, Nev. As the Civil War ended, Twain filed these stories six days per week for $100 per month, as the Associated Press noted. But since the Enterprise’s files were destroyed and the paper ceased publishing in the 19th century — though it announced it would make a go of it again earlier this year — scholars have had to compile the work from reprints and other sources. They have 110 documents so far.

“We’ve reached the point where we’re willing to say, ‘We’ve done our homework, we’re ready to put this into a book,'” Hirst said in a telephone interview with The Washington Post, estimating that a volume would appear in about a year and a half.

The Twain on display here is no novelist, but a newspaper man still gearing up to write “The Adventures of Tom Sawyer,” let alone the nuanced “Huckleberry Finn.” He was a bit of a muckraker — or, at least, a troll — when it came to the San Francisco police department, for example

“Blackmail, corruption and bribery is the rule, and not the exception, among the municipal body, all of whom are … like so many shoplifters or highwaymen,” he wrote, as SFGate noted. “The correspondent suggests the necessity of hanging half the policemen.”

But the driest wit in American letters was already pretty arid.

“I could close one eye in an opera and tell ‘Traviata’ from ‘Trovatore,'” Twain wrote of a visit to the opera, as SFGate reported. “I began to acknowledge to myself that this was tolerably true — and finally I deliberately decided that it was entirely and unquestionably true.”

Twain wasn’t in San Francisco for long; he left on assignment for the Sandwich Islands (now Hawaii) in 1866, then traveled to Europe and the Middle East, where he completed “The Innocents Abroad,” published in 1869.

For Hirst, the San Francisco writings offer a glimpse of Twain before the white suit — when he was writing however he wanted about whatever he thought was interesting. Damn the consequences, because there weren’t any.

The river “pilot is his ideal because the pilot has no constituency,” Hirst said of Twain’s attitude at the time, born of his experiences on the Mississippi. “The minister, the writer — they have a constituency that they have to take care of and be cautious about. Really, toward the end of his career, he starts writing things and deliberately not publishing them.”

Indeed, Twain’s autobiography was not published until 100 years after his death, as the author wished. Twain’s early work is somewhat free of such artifice — of the sometimes exhausting sense that the author is always pulling his readers’ legs. After all, this is the man who stuck a plainly ridiculous note at the beginning of “Huckleberry Finn”: “Persons attempting to find a motive in this narrative will be prosecuted; persons attempting to find a moral in it will be banished; persons attempting to find a plot in it will be shot.”

“It’s very hard to know when you’re in touch with the real Mark Twain,” Hirst said.