No capítulo dezenove de Prisioneiro de Azkaban after a lengthy discussion in the Shrieking Shack, Lupin and Sirius decide to kill Pettigrew:
"You should have realized," said Lupin quietly, "if Voldemort didn't kill you, we would. Good-bye Peter."
In the end Harry prevents them from doing it, but why would they have done it in the first place? In order to clear Sirius they would have to present Pettigrew, either alive or dead, as mentioned in Chapter Twenty-One:
"Sirius has not acted like an innocent man. The attack on the Fat Lady – entering Gryffindor Tower with a knife – without Pettigrew, alive or dead, we have no chance of overturning Sirius's sentence."
However, if they turn up with Pettigrew dead then they have to explain how he died. It would then be possible, even probable, that the Ministry would realize that they were the murderers. Murdering a fellow human being carries a life sentence in Azkaban, as per Chapter Fourteen ofcálice de Fogo:
"Now... those three curses – Avada Kedavra, Imperius, and Cruciatus – are known as the Unforgivable Curses. The use of any one of them on a fellow human being is enough to earn a life sentence in Azkaban.
Why would Lupin risk a life sentence in Azkaban just to kill Pettigrew? And from the context it does not appear that this was a rash decision in a fit of passion. He seems to have calmly decided that this is the best course of action, without any concern for the consequences.