"I will always treasure the wonderful people I have met and the friendships we have started."
Gray did not respond to request for comment today.
NZ First leader Winston Peters said the party respected Gray's decision, thanked him for his "valuable contribution to the party" and wished him well for the future.
According to the Otago Daily Times, Gray went on medical leave in mid-September.
Clutha Southland New Zealand First board member Jude Patterson – the wife of NZ First MP Mark Patterson – was appointed acting president.
"The board of New Zealand First has accepted a medical leave request from the president, Mr Lester Gray, and has appointed Mrs Jude Patterson as acting president until Mr Gray recovers,'' emails to the board said.
"The board members extend our best wishes to Mr Gray for a speedy recovery.''
In a Facebook post on September 20, a day after the email was sent to board members, Gray said on Facebook that he had recently found himself at the doctors "experiencing something I never believed a strong wiĺled, strong minded, upfront, honest person could suffer from".
"Thank you Mike King, John Kirwan and all the people working in this area!
You helped me ask for help!"
NZ First MP Clayton Mitchell, who, in a video recorded with Gray a month after he was elected president, said at the time he was very proud to have Gray as the party president.
"It's not going to be an easy task, we know that but from all the people I have spoken to inside caucus and external of caucus and all the party membership are 100 per cent behind you."
Gray's resignation comes two weeks before the New Zealand First annual conference in Christchurch.
According to the Politik website, New Zealand First's rules say that nominations for the presidency and its board must be in 28 days before the convention and the positions are voted on by the convention delegates.
And in the absence of the president, the party's leader – Winston Peters – can preside over the convention.
In the video with Mitchell, Gray said he had met NZ First supporters across the country who were keen for him to spread the party's message.
"The energy and enthusiasm I'm getting from them seeing a new president, having a new board elected and having a new constitution, as well as a promise that we've made that we're going to drive this party forward for the next 25 years."
Gray stood for Tauranga City Council in the 2018 by-election won by John Robson. In the 2017 central government elections, he stood for New Zealand First in the Bay of Plenty electorate but lost to National's Todd Muller.