The all-important question is, "Were your hopes unfounded?" If so, your feeling of discouragement is legitimate and should lead you to give up on your goal and find something else to do.
But if your goal is actually possible — if its achievement or fulfillment is something you are capable of — then the thoughts you have that led to your feelings of discouragement need to be updated.
How can you tell which is which? How do you know if your hopes were legitimate or not? One way is to go through the process described in Undemoralize Yourself. The process allows you to look at your beliefs and discover whether or not your pessimistic thoughts are legitimate.
If you discover your pessimistic thoughts are accurate, you know you can realistically give up on your goal and do something else. If you discover your pessimistic thoughts are not accurate, their hold on you will diminish and your demoralization will lift. Your motivation and determination will return without any further effort on your part.
Find out now: Undemoralize Yourself.
If you are not discouraged, do you know someone who is?
Maybe they would like to read this.