It will not have escaped your attention that almost all famous last words were said by people who died a long time ago. Does anyone know what Robin Cook's last words were? Or the last Pope's last words? Can you give me the last words of anyone who died within living memory? I doubt it.
This does not mean that modern people are less witty or pithy. It means either that they are being kept alive in a fog of drugs by officious doctors and gave up the power of speech weeks ago, or that they did say something witty a few weeks ago, and have refused to speak since, hoping those will be their dying words.
That is the wrong way to do it. In this age of high-speed communications and obsequious lawyers, there are far more efficient ways of devising good last words and getting them recorded.
Do not leave everything till the last moment. Do not improvise or busk. In the immortal words of Frankie Howerd, every ad lib and impromptu should be put in the script well in advance. Nevertheless, nobody knows what Frankie Howerd's dying words were. It makes you think, doesn't it, missus ?
Very occasionally people have made a final ad lib which is remembered. Voltaire, on his deathbed, was asked (by a priest, I presume) if he rejected Satan and all his works, and had the wit to say: "This is no time to be making new enemies." He also had the wit to say nothing afterwards, because if he had later said something like "No, not the red pills - the yellow pills!", those would have become his last words, which is what happened to Tallulah Bankhead (whose last words were "Codeine ... bourbon ...")
What you have to do is decide on your last words and get them witnessed by a solicitor. He will give you a form which starts: "This is the last and final utterance of etc etc ..." Having registered your last words, you are not legally obliged to say them when you are dying; they are now registered as your dying words. Just as you can decide what music you want at your funeral, or who you want your money to go to, you can quite legally choose your last words.
If you wish to ease your doubts by making a tape of you saying the words and having it played at your deathbed, this is also possible, though not necessary.
What to say
Best be pithy. Lord Beaverbrook's last recorded statement was as follows: "This is my final word. It is time for me to become an apprentice once more. I have not settled in which direction. But somewhere, sometime soon." It is sonorous, but total waffle, and far too long. You'd think an old journalist would have subbed it harder. Humphrey Bogart's was better: "I should never have switched from Scotch to Martinis." Pancho Villa's was even better. As the old Mexican leader lay dying and they bent over him to hear a final message, he said: "Tell them I said something interesting."
One final thought. It is quite possible that your chosen last words have already been chosen by someone else (the lawyer will do a search for you) so do remember to take along an alternative choice. Perhaps this is what Oscar Wilde did, and that is why he is credited with at least two separate final witticisms: "I shall die as I have lived - beyond my means" and "Either that wallpaper goes or I do."
Do not imitate the exquisite timing of the American Civil War soldier, General Sedgwick, whose last words in 1864 were: "They couldn't hit an elephant at this dist ..."