To write an internal monologue for Mr. Walter Cunningham while he is heading the lynch mob at the jail in Harper Lee's To Kill a Mockingbird, you must consider Mr. Cunningham's emotions and thoughts at that moment in time. You especially wants to consider the ways in which he feels self-conflicted. You should then be able to write his thoughts up in dialogue form as a monologue.
Mr. Cunningham feels self-conflicted at this moment in time because he is being pulled by two opposing natures within himself.
One of his natures guides him to be racist, along with much of Maycomb's society. As a racist man, he feels it is unjust for Tom Robinson to stand trial when his guilt is obvious due to the color of his skin. Since a trial would be unjust, especially if Robinson was acquitted, Mr. Cunningham wants to do all he can to prevent such an injustice by taking matters into his own hands, which is to give Robinson the execution he so richly deserves. Mr. Cunningham is especially willing to take matters into his own hands because he feels threatened by Atticus's abilities as a lawyer and knows that, with Atticus defending Robinson, Robinson at least stands a tiny chance of being acquitted, which is not a risk Mr. Cunningham is willing to take; in Mr. Cunningham's mind, due to his racial prejudices, Robinson should not be acquitted.
On the other hand, as Atticus phrases it, Mr. Cunningham is "basically a good man" (Ch. 16). As a generally good man, the other half of his nature is to be loyal, respectful, and a generally decent citizen. Mr. Cunningham has a great deal of respect for Atticus because he is helping Mr. Cunningham with his entailment, and Mr. Cunningham feels very loyal towards Atticus due to this help. The Cunninghams, as a family as a whole, are very loyal people. Atticus describes their loyalty when he explains to Jem, "[O]nce you earned their respect they were for you tooth and nail" (Ch. 23). Mr. Cunningham particularly demonstrates his loyalty by paying Atticus for his legal help through whatever means he can such as bringing firewood and products from his farm.
Since Mr. Cunningham is such a loyal person, Scout was able to remind him of his loyalty when she very politely asks him how his entailment is going, saying, "Well, Atticus, I was just sayin' to Mr. Cunningham that entailments are bad an' all that, but you said not to worry, it takes a long time sometimes ... that you all'd ride it out together" (Ch. 15). The moment Scout says this, she reminds Mr. Cunningham of the respect he has for Atticus and of his loyalty to him. Since he respects Atticus, he would not do anything to pose a threat to Atticus. Therefore, he breaks up the lynch mob and sends everyone home, regardless of the feelings he has due to his racial prejudices.