First of all, we should know everybody will die for one reason whether accident or disease or being killed by another person, so on, this is not important, the important is to how with pain and without dignity ? or in peace and respect. so if you developed terminal illness you need to do this procedure to have better quality at the end of life.
First of all find best doctor that can help you ,after that trust him and go under treatment even painful because may be you say I will die finally why I go for chemotherapy and etc,actually the reason is if you do not get treatment for example in ovarian cancer or lung cancer there will be metastasis to other organ like brain,liver ,lung etc so what will happened your pain and discomfort will be much more because it will not kill you immediately and you will suffer from multiple painful areas, also make you incapable as you can not do your daily task because of multiple organ failures, also you should know always there is hope unless you can not breathe at all!! Suppose you got prostate cancer now but the thing is it will take sometimes 10 years to kill you so why you want to lose your precious time ?? and there is the chance after few years scientist developed medicine for it so always be hopeful.
Do not fall into the trap of crook people that promise you just with herbal or prayer or exercise or mental action can treat you save your money for the better thing. If you have enough money enjoy your life, go to travel, see other people, do the good thing to other people donate something for sure it will make you happy as well.
Live until die do not die till you are alive, take your treatment and do not think more about it, if you can do something extra just do if you can not do it, do not say why I cannot do!!! Take a combination of treatment like prayer, herbal and chemical and surgery do not rely on just one of them.
Write your living will carefully just see if you cannot talk anymore, what should be done for you, if you feel you will have painful death may be a good idea to travel to the country that making death easy are allowed like some part of USA or Austria so on.
Just take 1 month or more leave and stay away from family and do whatever you wanted to do from that time that you were young and you could not do !! enjoy your life be free of any limitation for 1 month.
Before dying as much as you can clear your financial situation, do not leave everything unsolved about your legacy and family member, make everything easy for them transfer anything you have as long as not compromise your comfort do not let them fight after you for your legacy.
Give 10% of your fortune to charity, 40% to your wife or husband and distribute 50% for your kids. Join cancer survival NGO program and refresh your hope for life, anything is possible in this stupid world.
If you do not like to die in the bed and ICU or so on, join red crescent, red cross, and similar organization and go to conflict area so sometimes it can help you to make your dying enjoyable along with excitement, join some military that 90% of militant will die after their trip. But not in the terrorist group.