This used to happen with me many a times. To avoid this and keep my spirits high all the time ,I read success stories of famous personalities.
Let me tell a little story ;-)
A little girl - the 20th of 22 children, was born prematurely and her
survival was doubtful.
When she was 4 years old, she contracted double pneumonia and scarlet
fever, which left her with a paralysed left leg.
At age 9, she removed the metal leg brace she had been dependent on and
began to walk without it.
By 13 she had developed a rhythmic walk, which doctors said was a
miracle. That same year she decided to become a runner. She entered a
race and came in last.
For the next few years every race she entered, she came in last.
Everyone told her to quit, but she kept on running.
One day she actually won a race, and then another. From then on she won
every race she entered.
Eventually this little girl - Wilma Rudolph, went on to win three
Olympic gold medals.
Winners never quit !
I will do , What I want to do. Even if that means pursuing something for which I don't have any evident talent.