WASHINGTON (AP) — Former CIA Director David Petraeus confided in an email that he had committed "something terrible and dishonorable" by having an affair with his married biographer and explained that by resigning from the CIA he could not be blackmailed, according to a new self-published book by a Florida woman caught up in the scandal.

The 258-page book, "Collateral Damage," is by Jill Kelley of Tampa, who along with her husband, Scott, sued the government in June 2013 in Washington, alleging that officials violated the U.S. Privacy Act by disclosing information about them during the FBI's investigation of Petraeus, who resigned over the affair in November 2012.

The book includes scores of excerpted emails and text messages that Jill and Scott Kelley personally exchanged with Petraeus and his wife, Holly; Marine Gen. John R. Allen, then-commander of U.S. forces in Afghanistan; and other senior U.S. government officials. It also includes the sexually charged emails about Jill Kelley that FBI investigators traced to Petraeus' biographer, Paula Broadwell.

Kelley describes her book as providing a glimpse "beyond the narrative of one powerful man's unbridled ego, ill-timed infidelity, a jealous mistress and her relentless efforts to haunt an innocent family along with the world's most iconic military leaders."

On the afternoon his resignation was announced, Petraeus wrote in an email to the Kelleys that military officials at U.S. Central Command and U.S. Special Operations Command — both are based in Florida — "all knew Paula Broadwell (was) stalking them and me." He also wrote: "Bottom line: I did something terrible and dishonorable," and he said that by resigning as CIA director, "I guess she can't compromise me then."

Broadwell was not charged with stalking or any other crime in the case. Petraeus pleaded guilty to one misdemeanor charge of mishandling classified information relating to documents he provided to Broadwell.

Petraeus did not respond to an email inquiry from The Associated Press and could not be reached through messages left with three of his lawyers. His attorney David Kendall declined to comment on Petraeus' behalf. Broadwell declined to comment on the record.

Jill Kelley had complained to the FBI in 2012 when an unknown person sent her harassing emails. Her complaint triggered a criminal investigation that led agents to Broadwell and exposed their affair.

Jill Kelley's lawyers asked a federal judge last week to permit them to withdraw from their civil lawsuit, citing "irreconcilable differences" with the Kelleys. The decision, which came just weeks after the Justice Department declined a secret $4.35 million settlement proposal, means the family will almost certainly collect no judgment from the government. The judge set a deadline of Thursday directing the Kelleys to hire new lawyers, object to theirs quitting or advise the judge that they planned to represent themselves.

Jill Kelley's book was available for ordering online Tuesday evening.