First of all, you're a person of character and that makes you a better human being than most people out there.
As for your question, I have a similar issue with not wanting to lie outright and one solution I've thought of is to reduce my exposure to people's questions and inquiries by becoming less talkative and letting my actions speak for myself. If you are constantly doing things or working on something, people will be less suspicious and less prone to ask you about your thoughts, intentions and mental state because they will see that you're functional and will assume you're good. Obviously this doesn't eliminate all the questions; people will still be interested to know about you if they care about you. Another thing I do is try to divert my answers from my feelings to my mundane activities/occupations/endeavors as much as possible. This is, again, to point out that I'm (quasi)-functional so I don't have to lie about my feelings because I omit them completely.
However, while lying can be avoided or reduced through diversion or omission, I can't think of a way out of keeping your secret/hiding your truth. As you said, some people in your life will never have to know about it until it happens, otherwise it won't happen. A retroactive solution to this would be discussing this aspect in a suicide note and letting people know that keeping this secret was not comfortable for you, that you didn't feel like yourself in this process, but you had to because it was better for you.