Grief, unfortunately, is an unavoidable consequence of death. No matter when someone dies, under any circumstance, those left living feel the pain of that loss. So those who love you will be left with the pain of your death. Should you decide to commit suicide then you have to accept that you are going to cause pain to your loved ones. On the flip side of that, you will be dead, therefore you won't experience their pain. Grief subsides over time, they will never completely heal, but they will find a way forward.
You have to make the unfortunate but necessary decision of whether your life continuing only to prevent causing pain to your family is a price worth paying and that you can find contentment in that life.
I'd say that if you have any doubts about committing suicide, then you must feel, even deep down, that there is something worth fighting on for. That there is hope for a better tomorrow. That's a great thing, but just make sure that you prioritise yourself in that decision; what would be best for you. Life is precious and the decision must not be taken lightly to end it. I agonised for ages over the pain I'll cause when I kill myself but in the end, the decision I took was based on what was best for me.