Virginia authorities have published a "suicide note" in which the shooter who killed 6 people in a Walmart store complains of harassment at work and asks God for forgiveness.

After being shot last Tuesday, Andre Bing, 31, who was the night shift manager at a Walmart store in Chesapeake, Virginia, committed suicide.

The attack occurred two days before the Thanksgiving holiday and in the wake of a weekend shooting at a gay nightclub in Colorado that left five people dead.

On Friday, authorities in Chesapeake, 240 km southeast of Washington, D.C., issued a note titled "suicide note" that they said they had found on Bing's phone.

It says, "Sorry, my God, I let you down. This was not your fault, but mine.. I was harassed by idiots whose intelligence is weak and they lack wisdom."

As the letter stated, "I was equally guilty of failing my management team and everyone who loved me by convincing them that I was normal."

Peng apologizes for his actions, saying, "I'm sorry to everyone, but I didn't plan it. I assure that things happened as if the devil was leading me."

He continues, "I wish I could save everyone from myself. May God forgive me for what I am about to do."

Chesapeake City authorities confirmed that on the day of the attack, Andre Bing had legally purchased the 9mm handgun used in the shooting.

Six people were killed and four injured when Peng entered a staff rest room around 10 p.m. and opened fire, said the police.

This is the second mass shooting in Virginia this month, after three University of Virginia football players were shot dead and two other students were injured by a classmate after a school trip on November 13.

According to the "Gun Violence Archive" website, which specializes in counting violent incidents with shootings, there were more than 600 mass shootings in the United States during the current year, which is every incident in which 4 or more people are killed, without counting the shooter.