So sorry to hear that. However, I agree with everyone else.
Take a break from it all, pick yourself up and make a plan. First things first, get that feedback. Like DCDCo mentioned, if you have an established rapport with these interviewers, ask for more in-depth/ brutally honest feedback. It is so hard to know how to improve without knowing what exactly it is you need to improve. It may be something minor but it will make all the difference next time, and you'll be able to make sure that no one will give that same feedback ever again. Forget about how long you have been applying or how many rejections you have had. It will be difficult but you need to build your confidence back and believe in your skills, experience and ability. Figure out what it is that helps you to build confidence, whether working out, affirmations etc. You have potential and you are good enough, it is just about fully convincing them to invest. You are so close, many people haven't even been offered an interview yet and you're getting to the last round.
You seem to have a lot of valuable experience to just keep brushing up on the structure/STAR side of things, maybe mention stats in your competency examples and try to relax and show your personality.
Another thing to remember is that with some of these firms/companies that have rejected you, you may have actually dodged a bullet in some way, they may not have been a good fit for you. I hope I can give some more encouragement/advice once you are able to get some more specific feedback.