A Bucks County woman pleaded no contest Tuesday in the death of her 2-year-old son, who was poisoned with Vicodin in his sippy cup last summer.

Jennifer A. Clarey, 43, faces up to 50 years in prison. Prosecutors say she mixed a lethal cocktail of Vicodin and Benadryl and gave it to her son, Mazikeen Curtis.

Clarey, who suffered from depression and other mental-health issues, later slashed her wrists in an apparent attempt to take her own life in her Tullytown apartment, police said.

In court Tuesday, she stood silently as a judge sentenced her to 25 to 50 years behind bars on charges of third-degree murder and child endangerment.

“You were there to protect this child, and instead, you were so reckless and thoughtless and selfish as to take this child’s life before he ever had a chance to explore everything that life has to offer,” said Bucks County Judge Clyde W. Waite. “And I hope you will use your remaining time on this earth to try to vindicate your own wrongdoing.”

Clarey declined the judge’s offer to speak but said in response to questioning that she had been hospitalized for mental-health treatment four times in her life. Three of those times were in her 20s, she said. The fourth time was shortly before her son’s death.

Authorities said Clarey suffered from major depressive and bipolar disorders. She had not worked for the last 20 years since she said her neck was badly injured in a car accident. She instead lived on disability payments and was about to be evicted from her apartment at the time of her son’s death.

On Aug. 25 of last year, child welfare workers were called to Clarey’s home on Lovett Avenue for a wellness check around 10:05 p.m. after neighbors reported that she seemed “erratic” that day, and they worried about her son.

Clarey didn’t answer the door, even after Tullytown police were summoned.. Inside the apartment, police found Clarey, who had cut her wrists, lying on bloodied bedding next to her son, who was pronounced dead.

Authorities searched the apartment and found an empty 120-count bottle of Vicodin that had been prescribed to Clarey seven days earlier and an empty 4-ounce bottle of children’s Benadryl. The child’s sippy cup was in the sink.

A toxicology report showed that the boy died from toxic levels of hydrocodone and diphenhydramine HCl, the active ingredient in Benadryl, said Ian Hood, a forensic pathologist..

Clarey was hospitalized for three weeks as a result of her injuries and was later charged with criminal homicide, a charge prosecutors later amended to third-degree murder.

Mazikeen’s father, who did not live with Clarey, was not present in court Tuesday.

Clarey’s family, including her adult daughter, came to the court hearing but said nothing as they sat together in tears.