Three years before Christopher Ferguson allegedly killed three people in what appears to be a random home invasion in Newton, Massachusetts, he wrote about his struggles with bipolar disorder. 

He compared his diagnosis to a game of "Pac-Man." He said he sees himself as the arcade character who disappears when it runs off the screen on either side and "for a split second … is off the screen entirely."

"Imagine depression on the left and mania on the right side of this centerline," Ferguson purportedly wrote in a 2020 Medium essay.

"When life has pushed me too far in either direction, typically when manic, there have been times that have created a temporary suspension of reality in which I have, for all intents and purposes, disappeared from this analogic video game screen, or in my estimation been psychotically G-O-N-E."

NEWTON TRIPLE-HOMICIDE VICTIMS ID'D, REMEMBERED AS ‘SALT OF THE EARTH'

Chris Ferguson in a Facebook photo taken before arrest in Newton, Massachusetts triple homicide

Chris Ferguson, 41, was arrested in connection with the June 25 triple homicide in Newton, Massachusetts. (Chris Ferguson/Facebook)

It's unknown what – if any – specific event triggered a possible manic episode or if he had a mental breakdown before the alleged fatal confrontation with Gilda "Jill" D'Amore 73, and Bruno D'Amore, 74, and Jill's 97-year-old mother, Lucia Arpino, who were stabbed and beaten over the weekend.

His lawyer never mentioned a mental health diagnosis during Tuesday's arraignment, but Ferguson was like a real-life Pac-Man during his virtual court appearance via Zoom as he paced back and forth in the jail room while the prosecutor detailed the allegations.

NEWTON TRIPLE-MURDER SUSPECT PACES DURING ARRAIGNMENT IN RANDOM HOME INVASION

He frequently came in and out of view of the camera. At times, he stood against the far wall; other times, he stared straight into the camera through a glass window.

His lawyer, Dmitry Lev, said in a statement, "We express our deepest condolences to the D'Amore and Arpino families in the face of this unimaginable tragedy."

Police officers gather outside of the home where a triple homicide occurred in Newton, Massachusetts

Police officers gather outside the home where a triple homicide occurred in Newton, Massachusetts, on June 26, 2023. (David McGlynn for Fox News Digital)

"However, it is important that this case proceeds in the court of law rather than in the court of public opinion. We respectfully request that the legal process be given the opportunity to unfold in due course as we navigate through the system."

Meanwhile, the church-going family were lifelong residents of Newton who never missed 10 a.m. mass. 

Pope Francis called their local pastor from Rome to tell him he's praying for the victims, along with Cardinal Sean O'Malley, the archbishop of Boston, who said they died in "brutal and senseless murders."

"They loved Christ and the Church. On the day of their murders, Gilda and Bruno were to celebrate their 50th wedding anniversary at Our Lady Help of Christians. They lived their Catholic faith proudly and in service to the Church," said O’Malley, who plans to offer Mass for the victims at St. Peter’s Basilica.

Christopher Ferguson appears in a courtroom via Zoom

Christopher Ferguson is arraigned in Newton District Court on June 27, 2023, for the alleged murders of Bruno D'Amore, Jill D'Amore and Lucia Arpino during a botched home invasion. (Fox News Digital )

Ferguson was a cashier in the Newtonville, Massachusetts, Whole Foods but "is no longer working here," a store official told Fox News Digital on Thursday but wouldn't say if Ferguson's non-employment status was before or after the alleged murders.

The store official referred further questions to the company's media team, which confirmed that Ferguson is no longer an employee, "But we're unable to provide any additional details."

NEWTON TRIPLE-MURDER SUSPECT SEEN ACTING STRANGE, BARELY CLOTHED MORNING HE STABBED VICTIM 30 TIMES: DA

Before his time at Whole Foods, Ferguson worked for Framingham Public Schools as a campus aide from Feb. 4, 2021, to March 7, 2023, "at which time he chose to resign," according to the school district, which declined to answer follow-up questions.

"We cannot comment further on personnel matters," a spokesperson said in an email with follow-up questions.

Jill and Bruno D'Amore victims of Newton Massachusetts triple homicide

Jill and Bruno D'Amore, ages 73 and 74, were killed the night before they were going to renew their wedding vows for their 50th anniversary (Family handout)

Ferguson is a lifelong Newton resident who graduated from Newton North High School in 2000 with a scholarship to the University of Southern California. He went on to get his graduate degree at the University of California, Berkeley.

He discussed a few "episodes" that he suffered during his collegiate career in his blog post, which he said included paranoia that "people were following me" and multiple admissions to a mental health facility.

Police officers gather outside of the home where a triple homicide occurred in Newton, Massachusetts

Police officers gather outside the home where a triple homicide occurred in Newton, Massachusetts, on June 26, 2023. (David McGlynn for Fox News Digital)

"My defenses were up 24/7 for many of my visits to the inside while manic, because at the end of the day, anybody from burnt-out Ivy leaguers to correctional veterans to anyone in between, can voluntarily admit themselves or be committed," Ferguson wrote.

"In retrospect, while riding the four major manic waves, I must have been actively paranoid and delusional while passively suicidal."

3 ELDERLY PEOPLE KILLED IN MASSACHUSETTS HOME AS POLICE WARN CITY RESIDENTS TO LOCK WINDOWS, DOORS

"I remember telling one of my old shrinks that if I were to somehow, someway get hit by a bus while crossing the street or at the train tracks while scouring the ground for half-smoked cigarettes, I wouldn’t have minded in the least."

He ended the blog post with an admission that suicide "struck me as a good way to go."

Lucia Arpino, second from the left in purple dress, Jill D'Amore's 97-year-old mother, was one of three victims killed in a triple homicide in Newton, Massachusetts, along with her daughter and son-in-law Bruno.

Lucia Arpino, second from the left in purple dress, Jill D'Amore's 97-year-old mother, was one of three victims killed in a triple homicide in Newton, Massachusetts, along with her daughter and son-in-law Bruno. (Family handout)

Mental health was at the core of a city discussion in Newton on Wednesday night, which angered some community members who abruptly left because they felt city officials and counselors painted Ferguson as the victim when three beloved members of the community were killed in a brutal way.

"I thought they were going to talk more about the safety. I was shocked it was more about mental health and his mental health. They didn't talk about the victims as much as they should've," said a resident named Sharon, who wished to keep her last name anonymous.

ANA WALSHE MURDER: AUTHORITIES RECEIVED MYSTERIOUS RANSOM NOTE DAYS AFTER EXEC WENT MISSING

She and her mother were at the meeting for the first hour but left early because it was "senseless" and overly hot with no air conditioning.

"Some people in the area didn't even know what was happening that night," Sharon told Fox News Digital. "A family relative lives a few streets over and didn't know a killer was on the loose, and that wasn't addressed. There should've been a robocall or reverse 911."

A couple leaves flowers outside of a Massachusetts house

A couple brings flowers to the home where a triple homicide occurred in Newton, Massachusetts, on June 26, 2023. (David McGlynn for Fox News Digital)

"We have a lot of elderly people in our community who don't get their news from social media. There wasn't a safe feeling for a couple of days, and the city didn't address it."

The killings began as a random home invasion, according to authorities, who said Ferguson and the victims have no known connection, which put the city on edge for almost 48 hours until officials announced Ferguson was arrested.

ANA WALSHE MURDER: HUSBAND BRIAN WALSHE THREW OUT HACKSAW WITH POTENTIAL KEY PIECE OF EVIDENCE: DOCUMENTS

The randomness of the attack in an otherwise peaceful, close and well-to-do community "shocked" the neighborhood, said Jim Sbordone, a former Newton firefighter and a friend of the D'Amore family.

The victims were a loved, church-going family that was interwoven into the community's fabric.

An exterior view of Our Lady Help of Christians Parish in Massachusetts

This view shows Our Lady Help of Christians Parish in Newton, Massachusetts, on June 26, 2023. Jill and Bruno D'Amore were going to renew their wedding vows there. (David McGlynn for Fox News Digital)

Jill and Bruno were killed a day – maybe hours – before they were scheduled to renew their wedding vows for their 50th anniversary at the Sacred Heart and Our Lady's Collaborative church in Newton, where they were active parishioners and never missed 10 a.m. Sunday Mass.

The parish's pastor, the Rev. Dan Riley, said Monday that they were "salt of the Earth, the greatest people you'd ever meet. … They're going to be horribly missed."

Christopher Ferguson is arraigned in court at the Newton District Court

Christopher Ferguson is arraigned in Newton District Court on June 27, 2023, in connection to the deaths of Bruno D'Amore, Jill D'Amore and Lucia Arpino during a botched home invasion. (David McGlynn for Fox News Digital)

Riley – or Father Dan as he's better known by the community and his parishioners – wrote a tribute for the couple that he shared with Fox News Digital.

"With the sudden deaths of three beloved elderly parishioners over the weekend, we are immensely shocked and saddened," he said. "Our heartfelt sympathy and many prayers go out to the family and friends of these three cherished ones.

CLICK HERE TO GET THE FOX NEWS APP

"My deepest gratitude for the incredible love and support that the staff, parishioners, neighbors, the police, the counselors and all the government personnel who have been so solicitous, compassionate and helpful have given and continue to give.

"The agony of this tragedy is all too real. God’s love working through you is also real. Likewise, Jesus' resurrection is real.

"This means that, as we deeply, deeply grieve, we do so with the support of each other and with confidence that, in the end, good defeats evil and life conquers death."