'Wanhoop' is an emotion you experience when all hope (NL: "hoop") seems lost. 'Ellende' is not an emotion, but just a noun to describe (very) bad stuff.
If you use the adjective forms in Dutch, the words are more similar (but not totally interchangeable):
- 'ik voel me wanhopig': I feel desperate
- 'ik voel me ellendig': I feel miserable