I think one should never lose hope.
Let me tell you about one example. You see, one of my father's coworkers lost one of her children, a boy, several years ago to some really crazy cancer - it got in his brain and killed him very quickly. Supposedly, this was the kind of cancer that shows up in children, and once it shows up, the end is very near, with only one person surviving up to their, I think, 18 years of age. The fight against something like this had been hopeless from the beginning, but she never lost hope, even if she lost her child in the end. She would always say "well, there is always this institution, it's called 'a miracle'".
Her boy died. But in a matter of a very short time, she was pregnant and expecting another boy. So, yes, not the miracle she had been hoping for, but certainly a miracle nonetheless.