The only way I have been able to get over it and move on is just realizing that generally, he was dealing with some thing(s) that I was woefully unprepared to assist with in a constructive manner, and for whatever reason the problem(s) seemed insurmountable to him so much so that he did not see things improving.
Everyone wants to go through the "I could have helped" stage but the problems that lead someone to the conclusion suicide is a good option, are usually not the problems easily solved like losing weight or finding a new job that anyone could offer advice and perspective on. So from a default position merely giving a hug and being willing to listen might just not be enough, especially if you never saw it coming and there were no "signs" you knew to be looking out for.
It's never easy to think of people as "broken" that way and so far beyond help, but there is something that separates the way they "solve" their last problem, and the way we (you and I) solve our problems day to day.
It was probably about one year before I was okay "talking about it" with anyone, and about two years before I actually did start talking about it with someone.
You know when you are ready to start talking, and when you start talking, you will know when you are finally ready to move on.
Sorry for your loss by the way (and prospectively extended to anyone else that chimes in the thread with a similar story.)