Sounds like you are doing an amazing job. Trying to establish breastfeeding after a traumatic birth is utterly exhausting.
Please don't feel guilty, you are doing the best you can to feed your baby. I experienced similar and here are some of the things that helped.
Try skin to skin, where you lie baby on your chest, upright with head near boobs. Try and do this before they get hungry. Let them guide their own head to the nipple, their head will start bobbing. Try and relax while you do this.
Try different shaped nipple shields, my baby likes a certain one
Try starting with the bottle and then try for a couple of minutes, if he doesn't latch give the bottle. Keep trying through out the feed but don't the for so long that baby gets distressed.
When giving the bottle, try doing paced bottle feeding, this mimics breastfeeding more closely.
Try not to let yourself feel too stressed about it. (This is really hard)
Try abs latch for the morning feeds. This is when babies are generally in a better mood and latch better. The evenings can be hard, so I never bothered trying in the evening.
Some feeds, just give the bottle and enjoy feeding your baby. You deserve to enjoy this process. Trying to latch them every feed isn't necessary and really makes it more stressful. My lactation consultant told me to to do this and it literally saved my sanity. Up until this point I had not enjoyed one second of feeding my baby.
As baby's mouth gets bigger they latch more easily, so you may need to keep pumping regularly and just keep trying. My baby just all of a sudden latched at 4 weeks (not consistently) and then we managed to get rid of the nipple shield at about ten weeks.
The lactation consultant should be able to help
Keep practicing, practicing, practicing but also if you want to change to formula, it is absolutely fine. Your mental health is important too. There are soooo many happy healthy babies in the world who have been fed formula and are absolutely fine.
I hope some of that helps x