Taunton, Massachusetts (CNN) A woman on trial for urging her boyfriend to kill himself was delusional after becoming "involuntarily intoxicated" by antidepressants, a psychiatrist said Monday.

Michelle Carter "was unable to form intent" after switching to a new prescription drug only weeks before her boyfriend committed suicide in July 2014, Dr. Peter Breggin testified. She even texted his phone for weeks after he died, Breggin said.

Carter, 20, is on trial for involuntary manslaughter in the death of Conrad Roy III, who was 18 when he poisoned himself by inhaling carbon monoxide in his pickup truck.

Prosecutors have argued that while Carter played the role of a loving and distraught girlfriend, she had secretly nudged Roy toward suicide by sending him numerous text messages encouraging him to take his own life.

Prosecutors say the texts prove Carter badgered Roy to his death. But defense attorneys argue he already was intent on killing himself and that Carter had urged him to get help.

Legal experts are watching the trial closely because it could set a legal precedent on whether it is a crime to tell someone to commit suicide.

Defense attorney Joseph Cataldo talks to his client, Michelle Carter, in court.

A switch in drugs

Breggin, testifying for the defense, said that Carter had no nefarious intent but genuinely thought she was helping Roy. She had been on Prozac for years before switching to another antidepressant, Celexa, in April 2014 -- three months before Roy's death, Breggin said.

Such drugs can impair judgment, wisdom, understanding, love and empathy, he said -- especially in the adolescent brain, which is still developing and is "more susceptible to harm and all intrusions."

At the time of Roy's death, Carter was 17.

Breggin, who did not treat Carter, told Bristol County Juvenile Court Judge Lawrence Moniz that he reached his conclusions after reviewing Carter's educational records, text messages and police files and interviewed a half-dozen people who knew her.

Carter is being tried as a youth because she was a minor when her alleged crime took place. She waived her right to a jury trial, so the judge will render a verdict after testimony concludes.

Before age 12, Carter had seemed to be loving, caring and helpful. But as a teen she became "a very troubled youngster," Breggin said.

Carter began taking Prozac in 2011, when she was 14, after developing anorexia, Breggin said. She later transitioned to Celexa, which he said can increase suicide risk in people younger than 24 along with agitation, panic attacks, grandiosity and not understanding the trouble one is getting into.

Adverse changes also can occur when doses change, Breggin said.

Breggin testified that Carter began cutting herself between April and June of 2014.

Dr. Peter Breggin uses a whiteboard to illustrate a point Monday at Michelle Carter's trial.

'My life's a joke'

Roy's body was found July 13, 2014, a day after his suicide in his parked truck in a Kmart parking lot in Fairhaven, nearly 40 miles from his home.

As early as October 2012, Roy told Carter he was going to kill himself and that there was nothing she could do to stop him, Breggin said. The psychiatrist said Roy made four suicide attempts before succeeding.

Over the course of many texts to Carter about depression and hopelessness, Roy spoke often of killing himself and going to heaven, Breggin said.

Roy believed he had seen the devil at a hospital, and Carter said she had dreamed of the devil, said Breggin, who added that nightmares are common among people who are on Prozac.

"My life's an abortion," the young man told Carter in a text, Breggin said. "I just feel like my life's a joke. My negative thoughts have controlled me to the point where I'm legit going insane."

Roy suggested the pair should end up like Romeo and Juliet, Shakespeare's suicidal young lovers, and believed they would still be able to communicate after death, Breggin said.

Breggin said his clinical analysis was that Carter would do anything to help Roy and was always cheering him up. Meanwhile, Roy provided little encouragement and was negative about dating and marrying her, Breggin said.

'Enmeshed in a delusion'?

On Celexa, Breggin said, Carter became "involuntarily intoxicated" and began to think she could help Roy get what he wanted -- to die painlessly, to get to heaven and to help his family grieve less by understanding him.

"She is not forming the criminal intent -- 'I'm gonna harm him,'" Breggin said. "She's found a way to use her unique power to help and to help this boyfriend -- in her mind but not in his -- to not keep making mistakes and not keep hurting himself."

Assistant District Attorney Maryclare Flynn said last week that when Roy had second thoughts that fateful night, Carter told him to get back in the truck and listened on the phone while he cried out in pain and took his last breaths.

"She was enmeshed in a delusion," Breggin testified. "She was unable to form intent because she was so grandiose."

Breggin also reviewed a letter that Roy left for Carter. It said Roy was expecting to reach heaven, that he loved her, and that he thanked her for her kindness. In the letter he didn't say anything about being bullied.

A day after Roy's suicide Carter texted him, saying: "Did you do something??! Conrad I love you so much please tell me this is a joke. I'm so sorry I didn't think you were being serious Conrad please don't leave us like this," according to the text shown in court.

Two months later, Carter also texted Roy to say that she had raised $2,300 through a softball tournament to raise awareness of mental health issues.

"She imagines him looking down upon her," Breggin said.

Prosecutor: Carter was untruthful

During cross-examination, Assistant District Attorney Katie Rayburn tried to paint Carter as an untruthful person who craved attention.

Rayburn said Carter had routine medical checkups but doctors never noted on her medical records that she was cutting herself.

Rayburn said Breggin used text messages to conclude Carter was cutting herself.

The prosecutor said Carter was sending simultaneous messages of distress to a friend named Lisa and innocuous messages to boy she liked named Luke.

In the text message exchange, which Rayburn read out loud, Carter texted Lisa: "completely lost control tonight and I'm really disappointed in myself I thought I was getting better." Moments later, she texted Luke to say: "I'm bored as hell. You?"

In another message to Lisa, Carter wrote that she couldn't stop shaking because she "cut way too deep it won't stop bleeding."

The prosecutor said Carter's mother also never reported any concerns about the cutting.

Breggin said people who cut themselves are very secretive and learn how to conceal it.

Rayburn also tried to pin Breggin down on the exact period of involuntary intoxication. Breggin said it started between June 29 and July 2, 2014, but he wasn't clear when it ended.

On July 15, 2014, Rayburn said Carter met with a therapist, who did not indicate that Carter had any symptoms of involuntary intoxication.