I had a nightmare in the first few weeks of feeding DD - she had a bad tongue tie, crap latch and my poor nipples were cracked and bleeding by day two. I knew it was what I wanted to do though so had her tongue tie snipped and, with support from the local breastfeeding group and a tearful phone call to the national breastfeeding helpline, I persevered and we are still breastfeeding now at 9 months.
There's no harm in trying again. You've got nothing to lose. There are proven benefits from breast milk even if it's just for a few days, or even just the first feed. Plus no two babies are the same and you might have a much easier ride this time. Finding breastfeeding difficult at first doesn't mean 'failure'. While it's completely natural it's still a skill that you both have to master. Some mums and babies have a natural talent, others (like me and DD) need a bit of guidance and practice.
If it's something you strongly want to do then I really would encourage you to push through those first few horrific hard weeks. The pain goes, nipples heal (Lansinoh is a must). Accept that you will spend most of your time sat on your bum feeding, that housework will have to wait. Accept practical help from anyone that can offer it.
For me the convenience and the enjoyment I've had from BFing from week 6ish to now has been totally worth how hard those first weeks were and I'd do it again in a heartbeat.
However, if it's so bad that it's affecting your mental health or enjoyment of your new baby then you can change your mind at any point. That's not failing, it's deciding that it's no longer working for the two of you. Don't feel pressure from what anyone else is telling you (and that works both ways - I actually felt more pressure to give her formula than to continue breastfeeding which I desperately wanted to do, but if I was leaning more towards switching to formula I probably would have felt the opposite).
There is absolutely nothing wrong with formula if that's what suits you both best. Enjoy your lovely baby whichever way you decide to feed her.