Police investigated National MP Andrew Falloon after receiving a report he sent an unsolicited image to a young woman, but determined it did not meet the threshold for prosecution.
The Rangitata MP won't be standing again in his south Canterbury seat, after apparently sending an indecent image - not of himself - to a 19-year-old woman.
The National Party was notified on late Friday afternoon of an alcohol-related incident involving Falloon in which he behaved in a way "unbecoming of an MP".
Falloon sat down with National Party leader Judith Collins early this morning and after their conversation, he agreed to step down at the election.
Explained: Watch RNZ Political Editor Jane Patterson
Falloon suffering 'significant mental health issues' - Collins
Announcing his decision not to stand at the election in a statement after 2pm, the first-term MP for Rangitata in Canterbury, said he was receiving counselling after the death of a friend.
He said he had lost three close friends to suicide when he was younger, and another friend taking their own life had brought back "much unresolved grief".
"Recent events have compounded that situation and reminded me of the need to maintain my own health and wellbeing. I have again been receiving counselling," he said.
"I have made a number of mistakes and I apologise to those who have been affected."
He thanked National Party leader Judith Collins for her support, and said he looked forward to helping a new candidate for the electorate.
"I apologise for this disruption to my colleagues and to those I serve in Mid and South Canterbury."
Collins also released a statement, saying the party was advised of "an issue relating to Andrew late on Friday afternoon", and had dealt with it this morning.
"Andrew is suffering from significant mental health issues and his privacy, and that of his family, must be respected," Collins said.
The departure comes after a wild fortnight for the opposition, with a sudden change in leader and several high-profile resignations.
PM Ardern's office received information
The incident relating to Falloon was first raised by an individual who contacted the office of the Prime Minister Jacinda Ardern.
Her office passed on the correspondence to the office of Judith Collins, Leader of the Opposition, with that person's permission.
A spokesperson for the Prime Minister said all correspondence was treated with confidentiality and all matters to do with Falloon's resignation were a matter for Judith Collins.
At her weekly post-Cabinet briefing this afternoon, Ardern said her government had no more involvement and it was a matter for the National Party now.
She said she did not know, or seek to know, where the correspondence came from and nor did she seek to know the MP involved.
"The detail I had was reasonably limited," she said.
ACT leader Seymour pays tribute to Falloon
In a statement, ACT Leader David Seymour paid tribute to outgoing Falloon, saying he considered him a close friend.
"We were early members of ACT on Campus and both stood as ACT candidates at the 2005 election," Seymour said.
"We also worked closely together on the End of Life Choice Act. Andrew was determined to get National MPs on board for choice and compassion.
"It's positive that people can choose to put their health first and not be pressured to continue in a career if it isn't working for them personally."
Where to get help:
Need to Talk? Free call or text 1737 any time to speak to a trained counsellor, for any reason.
Lifeline: 0800 543 354 or text HELP to 4357
Suicide Crisis Helpline: 0508 828 865 / 0508 TAUTOKO (24/7). This is a service for people who may be thinking about suicide, or those who are concerned about family or friends.
Depression Helpline: 0800 111 757 (24/7) or text 4202
Samaritans: 0800 726 666 (24/7)
Youthline: 0800 376 633 (24/7) or free text 234 (8am-12am), or email talk@youthline.co.nz
What's Up: online chat (3pm-10pm) or 0800 WHATSUP / 0800 9428 787 helpline (12pm-10pm weekdays, 3pm-11pm weekends)
Kidsline (ages 5-18): 0800 543 754 (24/7)
Rural Support Trust Helpline: 0800 787 254
Healthline: 0800 611 116
Rainbow Youth: (09) 376 4155
If it is an emergency and you feel like you or someone else is at risk, call 111.