You can't. Doesn't work that way according to Harry.
Where is that said? Because death beat gives a totally different impression. When Harry prepared his own death curse he had time to direct it and choose a target and so on.
Probably enough time to choose an effect as well. And he was not dying yet.
Later something similar happened. Bob warns Cowl about Harry's death curse and Kumori does not have to kill harry to make him use it.
I think a wizard can use a death curse any time if he is prepared to pay the price.
But maybe Harry can trigger death curses more easily than most, he has suicidal tendencies.
Death Curses require the kind of high-running emotions brought upon by untimely deaths. Peacefully drifting away doesn't provide the kind of emotional fuel for the effects you can get from Death Curses (or Death Not-Curses, as the case may be).
Maybe an illness does, it is prematurely and can be highly emotional but you can not really curse someone for it.
The fear for what will happen to them when you can not protect them anymore could easily generate those emotions. Fear, loss, love, .....
The wish, strong emotional need, to take care of them beyond death.
Every death can be untimely and the emotional bond can be strong.
And of course preparation. If you know your death is coming you can prepare a death curse and make it complicated, like Harry's mother did.