You say 'with a heavy heart' - so I don't think you should give up entirely, especially if your baby is still very small. :)
For one thing, their digestive system is still developing and it is hard to tell at that point how much formula milk they are able to digest easily. Every baby is different. So it is good to still have some milk in your breasts in case you later need to switch back to more breastfeeding again.
I'm speaking from experience. My daughter (now 2) had a bit of jaundice too - and she was a hungry baby so I remember panicking in the evenings thinking I didn't have 'enough' milk and topping up with formula.
I also remember the feeding felt very 'angry' on her side in the late evenings and used to make me tearful, (with her flailing at my breast for more) because she also struggled with stomach aches and these stomach aches only stopped when I cut formula completely and switched to entirely breastfeeding, maybe three or four months into motherhood.
In terms of getting the flow going - the struggle is real! And a large part of it is being able to get enough rest, which is so hard in the early weeks. There are dietary things that can help with milk flow. For me lemongrass tea helped enormously, it is a galactagogue and helps you to produce more milk. Oat-based foods are also good for producing milk.
Get somebody else to help you at that crucial stage when your baby is the most hard work, if possible, so that you can get a little bit of sleep or take a warm bath -- being able to nap, can also help with breastmilk production. And drinking pints and pints of water. It's not easy, at all, but I was very glad I continued and was able to increase breastfeeding later. Formula wasn't easy on my baby's tummy, for whatever reason.
Also there is some initial very real pain when the milk comes in and the baby is learning to latch properly. That can make it very stressful - but this too passes with time and faster than I thought. Breastfeeding is not painful long-term. If you can do it even a bit - it is so much better for their immune system than none at all. They get your antibodies through the milk, so it helps them fight off whatever colds are going around.
Babies on formula of course do fine too!! Babies are super resilient and the digestive system adjusts. But in those very early weeks it is still developing very fast, so it is best to keep some breastmilk in the mix at this stage if at all possible, to reduce gassiness and so-on.
The KellyMom website is great for advice on breastfeeding.