A state treasurer has announced his resignation days after revealing a dire budget update, stepping down from his role after 25 years in politics.