I'm sorry, what is the essence of your situation
I started having a serious physical illness recently, I don't see any point in living like this, I don't have any mental illnesses. The son will stay with his mother, but I worry most of all about how he will be able to accept and survive this
My hunch is that the child will hate you for leaving him. It's not easy to understand for a child that a parent would choose to die instead of being in their life. If your condition has bad chronic pain included, and they see that, that might be a soothing factor for them, but otherwise I think it will be quite traumatizing.
On top of that, the death of a parent, especially a suicide might cause some very serious issues in a child, behavioural issues, mental health issues, trouble in school, those kinds of things. I had a friend years ago who killed himself a year after his dad died.
So consider it very carefully, if you want the best for you child suicide might not be the best option unless you're in constant, debilitating pain.