Only you know when it's time to call it quits on breastfeeding. But if you are considering quiting because you feel you aren't producing enough milk, I would like to suggest you try taking fenugreek (3 capsules 3 times a day), taking blessed thistle (I don't know the dose), drinking plenty of water, getting proper nutrition and enough sleep/rest. Also, worrying about your supply will decrease your supply. Sometimes, relaxing and doing something you enjoy while pumping helps. Thinking about it, worrying about it and worrying about your baby only makes it worse.
Even if you aren't getting enough milk, you can supplement with formula. There is no rule that a baby has to get only breast milk or only formula. I know a lot of moms who give their baby formula during the day and breast milk at night and others who mix breast milk with formula.
My first born only nursed for comfort so I pumped and bottle fed. My second born nursed for hours and hours keeping me from being able to do anything but nurse so I both nursed and pumped (so I could have more time with my first born and so my husband can also feed). With my first, I was so upset about him not latching well that I worried and felt like a failure. People (including lactation consultants) kept telling me to think about my baby while I pumped but that just reminded me that he wouldn't latch and I felt inadequate. Eventually, I decided to watch funny sitcoms on TV or read while I pumped and suddenly, the milk began to flow, and flow and flow and didn't stop until he was almost two. I had so much mommy milk, I began using it in homemade baby food, mixing it with baby cereal and eventually putting it in his sippy cup because he had grown too old for a bottle. Now my youngest is 21 months and as long as I get enough to eat and enough rest, I still have enough mommy milk for him.
I also want to add that I had a lot of complications from the birth of my second born. It was painful and stressful so my milk supply took a tremendous dip a few weeks after he was born. My doctor prescribed me Reglan which helped but I found the side effects too hard to live with so I began the fenugreek supplements, forced myself to eat and had my family help with my other child so I could get back to nursing. I also had to pump and dump because of a CT scan that I had due to my very complicated c-section. I also had infections and further problems (I won't bore you or scare you with the details of my horrible experience). So I know what you are going thru having a medical problem while breastfeeding. But I'm glad I pushed thru it all.
But again, only you can decide. But if you still want to keep giving your baby breast milk, I encourage you to try other ways to increase your milk production. Lactating seems to require both your mind and your body. If one or the other doesn't want to do it, or isn't getting enough support via nutrition, rest, emotional support, encouragement, confidence,etc- it just won't go well. Try telling yourself that you ARE breastfeeding instead of saying that you are TRYING to breastfeed. It requires 100% commitment. And you CAN do it. But if you choose not to do it any more, please remember, no matter what you decide, your baby will continue to grow and will continue to be loved and well taken care of by you. Good luck.