ROANOKE, Va. — For two years after losing yet another television job, Vester Lee Flanagan II lived in a nondescript apartment across the street from WDBJ Channel 7, the station that had fired him. He worked in modest jobs at several insurance companies nearby. As thoughts of murder and revenge were swirling around his brain, he did his best to keep them out of sight.

But he was, in his own words, putting on “a smiley face to disguise what was to come.” Three separate suicide notes, typed within the last few weeks and sent to a news organization on Wednesday, document the homicidal rage that had apparently been building for years, culminating when Mr. Flanagan shot and killed a reporter and a cameraman for his former station before shooting himself in the head as the police closed in.

The fax, along with letters and photographs from his childhood, and interviews with people who have known him over the years, reveal someone who was consumed for much of his life with an encyclopedia of grievances. He was a black man who saw racism in every workplace; a gay man who felt demeaned, especially by other black men; a floundering son who addressed his accusatory suicide note to his successful father; an aspiring television newsman who, despite some talent, could not succeed at work or get along with his colleagues.

There were arguments and confrontations at work, periodic eruptions, including a road rage episode captured on video and a sacrifice of his two pet cats, killings that Mr. Flanagan said he carried out because of anger at his firing. And then the final horrific explosion, broadcast live on television and posted on Facebook.