If he said, "This is your Get from today if I die from this illness," - it is a valid Get. It takes effect retroactively, but care must be taken not to invalidate the Get by living together.
Art: The Convalescent by Carolus-Duran
A page of Talmud in your inbox every morning — subscribe: https://talmudilluminated.com/subscribe/