A former government minister who resigned after it emerged he bombarded two female constituents with sexual text messages has stepped down from frontline politics, making way for his wife to replace him as a Conservative candidate.

Andrew Griffiths, who once served as Theresa May’s chief of staff while in opposition, stepped aside on Tuesday after narrowly surviving an attempt by the local party to oust him as the candidate for the seat of Burton.

He said he would back his wife, Kate Griffiths, who was selected as the Conservative candidate for the seat on Tuesday night.

Griffiths had the Tory whip removed in July last year and resigned as the minister for small business after it emerged he had sent more than 2,000 explicit messages to two women. He had the whip reinstated in December last year.

This year, he was cleared of wrongdoing in the sexting case by the parliamentary standards watchdog, which said it had not found evidence that the MP sent the messages while engaged in parliamentary activities or had breached the Commons code of conduct.

Griffiths said he was “deeply ashamed” of the scandal when it emerged and later said he was suffering from mental health problems linked to having been sexually abused as a child when he sent them.

“I am sorry that my mental health breakdown last year had such a profound impact on my family and the lives of those around me,” he said on Tuesday. “It was my life’s ambition to be an MP and it truly is the greatest privilege that anyone can have. However, I have sadly come to the decision that it is time for me to leave frontline politics.”

On Monday, it was reported that the way for Kate Griffiths to challenge her husband had been opened the previous day, when local members voted 50/50 on whether or not to keep him as their candidate, denying him the majority he required and forcing him to face a second vote on Tuesday.

But he made the decision not to stand, releasing a statement on his official Facebook page at about 7pm on Monday.

Conor Wileman, the chair of East Staffordshire Conservatives, confirmed to the Guardian that Kate Griffiths had been selected as the election candidate. A statement from the local party is expected later on Wednesday.

Last week, Charlie Elphicke, a fellow former Tory MP who also lost the whip over allegations of sexual misconduct, was replaced as the party’s parliamentary candidate by his wife.

Elphicke was readmitted to the party last December ahead of a vote of confidence in May, who was prime minister at the time. He was then suspended again when he was charged in July this year with three sexual assaults; all of which he denies. His wife, Natalie Elphicke, was formally selected as the Conservative candidate for Dover on Friday.

The Conservative party did not respond to a request for comment.