VICE News is closely watching policing in America. Check out the Officer Involved blog here.

A man shot and killed by San Francisco police officers left behind a series of suicide notes in his phone, including one to police in which he said he "used" them because he did not have the courage to kill himself.

The unidentified man was shot three times in a restricted area of a parking lot in the mission neighborhood Sunday after he pulled a gun on three officers. When police checked his weapon, they found it was a pellet gun.

Earlier that day, the man had approached two different officers and asked them about their weapons, including "what kind of guns SFPD carry, what kind of ammunition, and if they had been involved in any officer-involved shootings," the department said in a statement.

A series of notes later found on the man's phone suggested his death had been a suicide, and that he had used police to carry it out.

One of the notes was addressed to officers directly.

"Dear Officer(s), You did nothing wrong," the man wrote, in the letter published by police with his father's consent. "You ended the life of a man who was too much of a coward to do it himself."

"I provoked you. I threatened your life as well as the lives of those around me. You were completely within your legal rights to do what you did. You followed protocols. You did everything right," the note continues. "I just want to find peace within myself. I am so sad and I am so lonely. There is no place for me here. Please, don't blame yourself. I used you. I took advantage of you. I am so lost and I am so hopeless. God made a mistake with me. I shouldn't be here. Please, take solace in knowing that the situation was out of your control. You had no other choice."