Things that discourage you or make you feel hopeless are dispiriting. It can be dispiriting when the candidate you've supported and campaigned for loses the election.
Anything that makes you lose your sense of enthusiasm is dispiriting. Watching your favorite basketball team be defeated over and over again is dispiriting. If you're counting on friends to plan something fun for your birthday and they completely forget about it, that's dispiriting too. This adjective stems from the verb dispirit, and its parts, dis, "lack of," and spirit, "life or inspiration."