Learn. Practice. Do. Setbacks are often just temporary and usually very necessary. You can’t appreciate the sun if it never rains.
When I’ve had a bad day, playing guitar helps me forget what’s gone wrong by focusing all of my attention on my guitar.