Outgoing National MP Aaron Gilmore gave an emotional personal statement to Parliament today, and said the media scrutiny he was placed under had prevented him from functioning properly as an MP.
He admitted he had thought about "utu" on his enemies.
"For those of you who tried to goad me in seeking retribution in this House today, I too seek your forgiveness."
"To those in the media who predicted I would dig in my heels and hang on to Parliament as long as a could, well many of my friends wish me to stay in this House and fight those issues.
"But today, I'm not surrendering, I'm retreating," Mr Gilmore said.
His voice wavered as he told the House he would be looking for something new to do.
Mr Gilmore said he would continue to support Prime Minister John Key, the National Government and the National Party in a "limited capacity as a private citizen."
He said he was disappointed he would not be able to continue as a Member of Parliament, but hoped to help in a more modest way in future.
Mr Gilmore thanked his family for their support and apologised for them having to be subjected to media scrutiny.
He said he tendered his resignation because his errors of judgements were a distraction for the Government.
"This is causing immense stress to me, to members of my family, and because of constant media scrutiny into my life I am unable to continue to function properly as an MP.
He ended his speech by saying, "And finally ... the one I love, babe - I am coming home".
Mr Gilmore's statement in the House came after his resignation on Sunday night, after earlier telling media he would not resign.
In a statement issued on Sunday, he said on reflection it would be fairer on his family and close friends if he did step aside.
Last week emails were released by the Ministry of Business, Innovation and Employment showing Mr Gilmore had sent inappropriate emails.
Just yesterday threatening text messages surfaced.
Blogger Cameron Slater posted a picture of one of the text messages allegedly sent by Mr Gilmore to an unnamed person which said: "Utu - you should learn what it means."
Utu is Maori for revenge or payback.
One of the text messages was sent to lawyer Andrew Riches, who wrote an apology to the Hanmer hotel where Mr Gilmore originally behaved badly by insulting a barman and threatening him with losing his job.
Mr Riches also released a public statement which accused the MP of misleading the Prime Minister's office.
This morning Mr Gilmore briefly attended National's caucus meeting for a hurried farewell.
He received a round of applause inside the caucus room and was rushed out of the caucus room by National Party chief whip Louise Upston.
- Additional reporting Matthew Backhouse