In this case, the disagreeable or offensive subject is death, so we seek to indirectly say he died. We can say he passed away or he rests in peace; that is euphemism. We can also say he kicked the bucket; that is also euphemism as it avoids directly referring to death. The fact that it would inappropriate to use it in certain situations is irrelevant. A euphemism is always euphemistic, regardless of the situation in which it is uttered. There are cases where kick the bucket is not inappropriate, but it is still euphemistic.
Well then, every word or expression that’s considered a euphemism is predicated on a relative basis. Therefore, even the use of the word death or dying can be euphemisms for, the body decomposed and lost all biological functions emitting an extremely unpleasant fetid odor of rotting flesh.