Jared O’Mara, MP for Sheffield Hallam, has announced he will stand down as a member of Parliament.

O’Mara said he will step down in September after the end of Parliament’s recess for summer.

He said that he was resigning to take time to deal with issues with his mental health.

O’Mara won the seat for Labour in 2017 from former Liberal Democrat leader Nick Clegg. However, he was suspended and later quit the party after he allegedly posted homophobic and misogynistic comments online.

In a statement, O’Mara apologised “to my constituents, the people of Sheffield and the people of the UK as a whole.”

The news comes just days after his press chief Gareth Arnold dramatically through O’Mara’s Twitter account. One of his tweets, which have since been deleted claimed that the former Labour MP did not care about his constituents and said “Sheffield Hallam deserves so much better than you.”

O’Mara published a statement on his website the day after the incident, apologising for his behaviour and pledging to seek help for his condition.

He was also critical of Labour leader Jeremy Corbyn and the party as a whole, claiming he did not receive the support offered to other parliamentary candidates.

“I stood because I wanted to give my time to support the democratic process and because I was inspired by Jeremy Corbyn… but I got no support from him or the National Labour Party during the campaign,” he said.

O’Mara’s resignation will trigger a by-election in the seat just weeks before the United Kingdom is due to leave the European Union.

Labour won the seat by just over 2,000 votes in the 2017 election, and the Liberal Democrats will be hoping to win back the seat.

The Liberal Democrats are also hoping for a win in next week’s Brecon and Radnorshire by-election. A win for the party would reduce the Conservative government’s slim majority to just two.

Based on recent polling, the Liberal Democrats are close to certain to win the seat, with Electoral Calculus putting their chances at 86 percent.