I would not let them know, because I wouldn't want to burden them with my problems.
I think I would, if not I'd write letters. Also depends how long I had. I don't think death is a terrible thing but I imagine it would still bring lots of things to the surface that I would need help to see clearly.
I'd probably tell them towards the end, just so it's not a total shock; but hopefully not too early that they start treating me too differently.
I'd tell them. Honestly I'd rather not, but if they were accidentally horrible during that time and they didn't know, they'd feel bad forever, so I would.