A Westchester judge whose appointment sparked controversy and who was suspended for using her courtroom trash can as an emergency toilet because of her weight and medical problems has died, according to court documents.

White Plains City Court Judge Elizabeth Shollenberger passed away on Thursday, her lawyer wrote in a letter addressed to the judge overseeing her discrimination lawsuit. She was 63.

Shollenberger sued the New York State Unified Court System in 2018 following her suspension from the bench, which she claimed violated her protected status as a disabled person.

Her Manhattan federal suit sought reinstatement and “reasonable accommodations for her disabilities,” in addition to monetary damages.

But her lawyer Anthony Consiglio wrote in documents filed late Friday that her estate needs time in the wake of her death to determine whether it will proceed with the lawsuit.

Shollenberger — whose judicial appointment sparked accusations of cronyism in the first place — suffered from a litany of ailments, including hypertension, chronic obstructive pulmonary disease, and a fungal infection in her lower left leg stemming from a 1989 fall between the gap of a subway car and the station platform.

Her regimen of medications “frequently cause stress to [her] gastrointestinal system, requiring her to have quick access to the restroom,” the suit says — including a fateful day in May 2017 when she was alone in her courtroom and overcome by a sudden, urgent need to use the facilities.

“In distress, she defecated in a plastic-lined wastepaper basket,” according to court papers. “She then removed and tied the plastic liner bag and double-bagged it for disposal, but a small stain about the size of a quarter was visible on the carpet.”

The incident caused a “hysterical” reaction from court staffers — who strung up yellow police tape and went in to clean up in hazmat suits — and her suspension soon followed.

At the time, court systems spokesman Lucien Chalfen said numerous accommodations had been made for Shollenberger, but that her cases were reassigned to other judges by mid-August 2017.

“The reassignments were made for her personal, and the public’s, health and safety at the Court,” Chalfen said.