A beloved teacher who had been plagued by mental health issues most of his life still managed to have an ‘impact on so many different people,’ an inquest heard.