National's Aaron Gilmore says media scrutiny over the past fortnight has left him unable to function as an MP and he is retreating, not surrendering.
The backbencher made a personal statement to Parliament on Tuesday afternoon after formally handing in his resignation in the morning.
On Sunday, Mr Gilmore announced he would resign after widespread criticism of his conduct at a Hanmer Springs hotel, where he is alleged to have threatened to use his position to have a waiter sacked on 27 April.
In his final speech, the Christchurch list MP told the House that he found some of the things said about him deeply hurtful and had been through the five stages of grief over the past fortnight.
"I have made errors of judgement as a Member of Parliament. Those errors are causing an unnecessary distraction to the Government. This is causing immense stress to me, members of my family.
"And in light of constant media scrutiny to my life, I'm unable to continue to function properly as an MP."
Mr Gilmore said he had felt very angry in recent days and had thought about taking revenge against his enemies. However, he told the House it would not dignify Parliament to use unseemly words against others in his final speech.
"To those in the media who predicted I would dig in my heels and hang on in Parliament as long as I could, while many of my friends wished me to stay in this House and fight these issues. But today I'm not surrendering, I'm retreating."
The Speaker's office confirmed it had received a letter from Mr Gilmore stating that his resignation would be effective in a week.
Earlier, Aaron Gilmore made a final five-minute appearance at his party's caucus meeting and did not speak to media.
Applause was heard from the caucus room about five minutes after the meeting started. Mr Gilmore then left accompanied by chief whip Louise Upston.
On Monday afternoon, Mr Gilmore appeared to have sent text messages to six people with the words "Utu, you should learn what it means". 'Utu' is the Maori word for 'revenge'.
The next person on the National Party list is broadcaster Claudette Hauiti.
Listen to more