He has been watching videos of himself onstage and in interviews from his drug days, including one from Black Entertainment Television that he said he has no memory of doing, when Ambien made him so befuddled he couldn’t even respond to simple questions. “I want to see what I looked like when I was on drugs, so I never go back to it,” he said.

In the five years between his own albums, he worked as a producer, making beats for other rappers, and occasionally showed up as a guest rapper; he now calls his verse on “Touch Down,” with the Atlanta rapper T.I., “horrible.”

But last year, just two months out of rehab, Eminem met Dr. Dre met in Orlando, Fla., to try recording. Eminem had been doing what he called “mind exercises” to get himself writing. “I’d stack a bunch of words and just go down the line and try to fill in the blanks and make sense out of them,” he said. “For three or four years I couldn’t do it any more.”

When he was sober, he said, “the wheels started turning again.” Working in Orlando and then in Detroit, Eminem and Dr. Dre recorded hundreds of tracks and finished enough new songs for three albums. They have culled them to two; Eminem plans to release “Relapse 2” before the end of this year. “The deeper I got into my addiction, the tighter the lid got on my creativity,” he said. “When I got sober the lid just came off. In seven months I accomplished more than I could accomplish in three or four years doing drugs.”

From the beginning Mr. Mathers has smeared the boundary between Eminem and Slim Shady. In “97 Bonnie & Clyde” from the 1999 “Slim Shady LP,” the rapper takes along his gurgly baby daughter  named Hailie, like Mr. Mathers’s real daughter (who lives with him in Detroit)  while disposing of her mother’s murdered corpse. The new album traces Eminem’s addictive tendencies to one of his earliest and most frequent targets: “My Mom,” who, the song says, used to mix Valium into his food to make him manageable.

But the music for songs like those is reassuring, even perky. Dr. Dre has long provided clean, crisp tracks that are far from ominous. Often they have the bouncy beat and singsong choruses of kiddie music. That smiley-faced nastiness was enough to make Eminem a target for the censorious, which in turn gave him a new bunch of antagonists to provoke. “It ended up pushing my buttons,” he said. “You’re only going to make me worse now.”