I'm having such a hard time.

Kayla🐙
I'm doing breastfeeding and formula. But mostly pumping for the past month of my daughters life. But this past week she would refuse the formula or eat only 2oz and start to spit it out or cry until she's on my boob. But it hurts to breast feed. I can't get her to latch on right for the life of me and when I do she gets frustrated and goes back to a bad latch. She will take the breast milk in a bottle but not the full 4oz just 2 oz and want my boob. I don't know what to do.