A 31-year-old Wheaton man who pleaded guilty to the shotgun slaying of his estranged wife was sentenced yesterday to life in prison after tearfully reading a long letter in open court apologizing for the killing.

"I am far more sorry than I can express and I truly wish that it were me instead of her that died," Thomas Franklin Smith III said moments before his sentencing.

Smith had been charged with first-degree murder in the slaying of his wife, Patrica Lynn Smith, 24, last August. The murder occurred when Smith entered his mother-in-law's apartment in Wheaton, where his estranged wife was staying with the couple's 6-year-old daughter.

Patricia Smith was shot numerous times and fatally wounded as she fled from her husband and jumped from the second-floor balcony of the apartment.

Thomas Smith was arrested outside the apartment after he called the police, according to court records.

Judge David L. Cahoon imposed the maximum sentence of life in prison under state sentencing statutes, according to a spokeswoman for the state's attorney's office. Smith will not be eligible for parole for at least 20 years, the spokeswoman said.

In handing down his sentence, Cahoon said Smith "represented a danger to others in the community" and should be "incapacitated and confined as long as is necessary." But the judge said Smith could enter a special psychiatric prison facility in Patuxent, Md., if he meets the eligibilty requirements.

Patricia Smith's mother, Buelah Stewart, who also testified at the hearing yesterday, recounted how Smith walked into her apartment with a sawed-off shotgun and fired one shot through a bathroom door, slightly injuring Stewart's boyfriend. "I heard shots ring out and my little granddaughter screaming, 'Mommy, mommy' . . . . There was nothing I could do."

In his 12-page letter Smith said it would be difficult to explain his actions to his daughter, who is now in Stewart's custody.

"I know that one day my daughter will come to me and want to know what happened and why I killed her mother," he said. "I hope that I will have the answer for her."

In his letter, Smith also referred to the morning of the killing and his thoughts as he watched his wife lying on the ground outside the apartment.

"After I shot her I ran around in the apartment in a panic," he said. "I wanted to hold her, but I couldn't touch her. I just paced back and forth crying and begging God, 'Don't let her die, don't let her die.' "