Feeling awful

Well as first 24 hours we pretty much forced baby Gavin to breastfeed. And then finally we have up because he started hyperventilating really badly. So we switched to formula. I feel awful because I had my heart set on breastfeeding and I feel there is something more I could have done. We tried nipple sheilds and even pumping he was not having any of that. The second we put a bottle in his mouth he immediately began drinking and then slept for 4 hours. But I still feel bad for not giving him the nutrients in breast milk