Does it have to be entirely hopeless right from the start, or just quite hopeless - I think the reader needs a little bit of hope as the bait on the line. You could completely invert the hopefulness of the journey - normally things get worse and worse for the protagonist until they finally overcome the challenge in the final victory, however you could have things start off pretty bleak and make it gradually more hopeful until the final crushing blow in which everyone dies in some nihilistic revelation of the universe's indifference. The film 300 is springing to mind.
It wouldn't work for me. I'm the kind of reader who checks the ending first and then scans the entire book before deciding whether to read it. If I saw that the whole thing was pointless I wouldn't read it, just as I will never read G.R.R. Martin's books.