You haven't failed lauray far from it. It's part of the fasting process to see how the body and mind cope with not eating, and I certainly had the same problems when I first started out.
Maybe instead of focussing on the length of the fast, focus on how you will break it. Even a day without food is good for your system but what is just as important is breaking the fast cleanly. That's what I've been doing this time around. I did a 5 and a half day dry fast and have broken it well on fruit for the last two and a half days. Whereas in the past I have been more focussed on the length of the fast itself and then ended up gorging afterwards. It is clear to me now my mistake has been not to include the 'recovery' period in my plans as clearly as the fasting time. And by not planning for the breaking of the fast properly I've left myself open to eating what I shouldn't.
Good luck!