Setbacks happen, but you only get derailed if you don't have a plan. I've said this many times and I talk to clients on a regular basis, we never plan to fail, we just build a plan.
If you want to get better at something you have to measure it. In the same conversations I have with clients, we talk about goalsetting. You can use whatever form of goalsetting you want, but the goal has to be specific, measurable, and there has to be an end date.
Two of my favorite sayings from Dan John are,
"If it's important to you do it every day." "If it's not important to you, don't do it."
"The goal is to keep the goal, the goal."
In simplistic terms you have to control the controllables. If things are outside of your control don't worry about them. I know it sounds really simple, it is. We get bound up in so many insignificant things, that it consumes our lives.
Don't let setbacks derail you. If you have a plan in place with specific goals, and accountability measures in place to help you control the controllables, success is yours.