A Boston-area man accused of killing his wife and two children said in a note that he should have written a book about dealing with his wife's dysfunctional family and not let his anger fester "until one murderous night."

Details of the letter written by Thomas Mortimer IV and found at the scene of the slayings in Winchester were contained in a nine-page statement of the case filed by prosecutors.

The statement was made public Tuesday after The Associated Press and other media fought efforts by Mortimer's defense to have it impounded.

In his letter, allegedly written in the hours after the June killings, Mortimer moves between confession and self-pity, writing, "What have I done? I hate myself more than ever," and "I wonder what life would be like if I did not chicken out."

He wrote that it would have been better to write about his wife's family "instead of bottling up my anger, frustration, resentment and hatred and letting it fester until one murderous night."

He also expressed shock, and relief, at what he'd done.

"I am ashamed, frightened, relieved, surprised that I murdered my family, disgusted with myself," he wrote.

The statement did not include four lines from the original statement of the case. The lines remained under seal Tuesday while the defense was considering whether to appeal a court order to release them; the deadline is Thursday. Mortimer's attorney, Denise Regan, declined comment.

Mortimer, originally from Avon, Conn., is accused of killing his wife, Laura Stone Mortimer, mother-in-law, Ragna Ellen Stone, and two children, 4-year-old Thomas "Finn" Mortimer V, and 2-year-old Charlotte Mortimer.

According to prosecutors, Mortimer and his wife argued the evening of June 14 about a bounced check for $2,499 to pay federal income taxes. Mortimer had been unemployed for more than a year and only weeks earlier had started a job at a consulting firm. His wife worked as an economist in Boston. The couple had lived at Stone's house since 2005.

Mortimer's parents were at the house and recounted the argument to authorities. They said he was calm during the discussion. But prosecutors said Mortimer killed his family and mother-in-law sometime in the hours after his parents left that evening.

The bodies were discovered by medics June 16 after Mortimer's sister-in-law notified authorities when she couldn't contact her mother or get inside the house after seeing what appeared to be blood on the wall.

Police found a bloody knife with a bent handle at the scene, and autopsies showed all the victims died of "sharp force wounds." Stone's body was under a rolled up rug, and prosecutors said she'd been attacked at the front door and dragged into house after trying to escape. Laura Stone Mortimer and her son were found lying in pools of blood in a family room. Charlotte Mortimer was found dead in her crib.

Prosecutors say Mortimer fled after the killings, buying gas and food at a local convenience store. But he was arrested June 17 in western Massachusetts after a father and son reported that they'd helped Mortimer jump his car battery in the town of Montague that afternoon.

According to the statement, after his arrest Mortimer called his parents and apologized for "wrecking everyone else's lives." His mother asked if he'd snapped, and he said "yeah." She asked if it was about money, and he said partly, and he admitted he'd tried to commit suicide by hooking up garden hoses to his car's tailpipe and pumping the exhaust inside the car, according to the statement. He also had superficial cuts on his left wrist and thigh.

In his letter, Mortimer wrote, "I did these horrible things because I could not cope with the responsibilities I took upon myself." He wrote he should have divorced his wife and been a good role model for his children. But he also wrote that he couldn't envision things getting better and said he believes "they are in a much better place than they ever could be living with Laura and living with me."

He added he was "looking forward to peace, but already missing terribly Finn and Charlotte. That will be my 'hell.'"

(This version CORRECTS the defense hasn't decided whether to appeal.)