The correct option is
D Become discouraged
To 'lose heart' means to become discouraged and stop believing that you can succeed. Therefore option D is the correct answer.
Options A, B and C are incorrect because 'become desperate' means to feel or show a hopeless sense that a situation is so bad as to be impossible to deal with, 'feel sad' refers to being unhappy, showing remorse and 'become angry' means refers to feeling or showing strong annoyance, displeasure, or hostility.