You have to realise downswings are normal in poker. Everyone takes from the same stew. Just focus on making the right decisions...be rock solid all the time...Stick to your strategy. You might also look at your way of playing, analyse, analyse and see if you can tweak things or even make a 180 degree change if thats necessary.
When you take a horrible bad beat, got very unlucky or you've made a total goofy play that cost you a lot and you are down 2, 3 ,4 or 5 Buy Ins. I've been through this and I figured out that the only way going forward for me is; 1- Be present with your thoughts and don't dwell on the downswing ( Don't think about it for more than 5 or 6 mins) Think about it when it happens and come up with a plan quickly. 2- Choose to be calm going forward, a calm mind even without much confidence is extremely important to build your roll and confidence back. 3- You can always take a break.