WASHINGTON — Studying “Hamlet,” the revenge play about a rotten kingdom, I tried for years to fathom Hamlet’s motives, state of mind, family web, obsessions.

His consciousness was so complex, Harold Bloom wrote, it seemed bigger than the play itself.

Now I’m mired in another revenge play about a rotten kingdom, “Trump.” I’ve tried for years to fathom Donald Trump’s motives, state of mind, family web, obsessions.

The man who dumbed down the office of the presidency is a less gratifying subject than the smarty-pants doomed prince. Hamlet is transcendent, while Trump is merely transgressive. But we can’t shuffle off the mortal coil of Trump. He has burrowed, tick-like, into the national bloodstream, causing all kinds of septic responses.

Trump is feral, focused on his own survival, with no sense of shame or boundaries or restraint.

“In that sense,” David Axelrod told me, “being a sociopath really works for him.”

As Axelrod wrote in The Atlantic, “Over time, Trump has worked to discredit and demean any institution that raises inconvenient truths or seeks to hold him accountable for his actions — not just media, but law enforcement and the election system itself.”

It remains to be seen, as Axelrod has noted, whether indictments will serve as kryptonite against Trump or energy packs fueling his return to the Oval Office.

After believing time and time again that Trump had self-destructed — after he denigrated John McCain, after we found out he had pretended to be his own spokesman, after the “Access Hollywood” tape, and after he shared classified material with Russian diplomats — I have learned to wait and see whether Trump will preposterously get away with things. He has spent his entire life cutting corners and dancing on the edge of legal. But Jack Smith, the special counsel, is teaching him that you can’t conduct a presidency that way.

So we must contemplate Trump’s weird preoccupation with his boxes full of state secrets.

“He held onto them. Why?” Mitt Romney asked reporters on Capitol Hill. “That’s the question. Why is the country going to have to go through all this angst and tumult? Why didn’t he just turn the documents in?”

The papers spilling out of boxes are a snapshot of Trump’s id. He raised his personality to a management style. His disordered mind has caused public disorder.

During his presidency, The Times reported, “his aides began to refer to the boxes full of papers and odds and ends he carted around with him almost everywhere as the ‘beautiful mind’ material. It was a reference to the title of a book and movie depicting the life of John F. Nash Jr., the mathematician with schizophrenia played in the film by Russell Crowe, who covered his office with newspaper clippings, believing they held a Russian code he needed to crack.”

The aides used the phrase — which turned up in the indictment — as shorthand for Trump’s organized chaos, how he somehow kept track of what was in the boxes, which he held close as a security blanket. During the 2016 campaign, some reporters said, he traveled with cardboard boxes full of real estate contracts, newspaper clippings and schedules, as though he were carrying his world around with him.

The guy likes paper. And, like Louis XIV, he believes “L’État, c’est moi.” His favorite words are personal pronouns and possessive adjectives. Kevin McCarthy is “my Kevin.” Army officers were “my generals.” Abdel Fattah el-Sisi was “my favorite dictator.” In the indictment, a Trump lawyer quotes Trump as warning, “I don’t want anybody looking through my boxes.”

Is he so addled by narcissism that he sees no distinction between highly sensitive documents belonging to the government and papers he wants to keep? He treats classified maps and nuclear secrets and a Pentagon war plan for Iran like pelts, hunting trophies, or family scrapbook items.

He’s like a child, dragging around the things that are important to him. Chris Christie joked about Trump taking some of the boxes on his jet to his club in Bedminster: “He flew the boxes up to New Jersey for summer vacation. What is this? Like, they’re a family member?”

It bespeaks a frailty, a need to be bolstered by talismanic items.

When he was a real estate dealer and reality star, his office in Trump Tower was papered in framed magazine covers, so that his face stared back at him from every angle, like an infinity mirror.

He must worry: Without pieces of paper to prove I am important, am I important?

Trump has said one of his favorite movies is “Citizen Kane.” Perhaps the boxes at Xanadu he’s obsessed with, the papers that could make him the locked-up loser he dreads being, have been revealed as his Rosebud.