Oh OP - I usually lurk on here but I've created an account just to reply to you!
I really feel for you. I was in this exact same position with my eldest.
Firstly - ignore the advice from some PP to feed on demand. This is correct for most newborns but not accurate in your situation. You need to keep up the three hourly-thing for now (and feed more often if your baby wants it but not less than three hourly). Once DD started gaining weight we moved to fourly hourly, then to on demand, but it took several weeks and a bit of back and forth.
I mixed fed from five days (which was when the midwife realised DD was losing weight and we went to hospital) until eight weeks, at which point we got back to EBF on demand. She just gradually took more and more breast milk and less and less formula. The last two weeks we were mostly pouring the formula down the sink as she'd already had enough breast milk (I used to offer the formula after a breastfeed) but I was so anxious I kept making it until I was 110% certain she didn't need it! I remember she took barely any formula for about two days so I was on the verge of stopping offering formula, then out of nowhere she had a huge breastfeed followed by a whole bottle of formula so I went back to making up the formula again, only to have to pouring it down the sink again!
I went on to BF until she was 18 months. So it can be done, but you're absolutely right about it being brutal. I had a tonne of support from the community midwife, the nurses and consultant at the hospital, my husband and a local group of volunteers who are breastfeeding champions. Rope in anyone who will be supportive to help you in any way you can.
If you decide to FF that's absolutely fine, but it may be worth preserving for a few more weeks if you think you can. It looks like I'm the third person on here to say they were in your position and got back to EBF at the eight/nine/ten week mark.
There was a nice little silver lining in it all - a lot of my friend's EBF babies wouldn't take formula. But because mine had had it in the first few weeks she would if she was offered it. So I could occasionally leave her with my husband or someone else. It also helped when I went back to work - I had this plan to build up a supply of pumped milk for her to drink before she started nursery but it turned out I was crap at expressing (and I persevered for longer than it took to get her back to EBF and hired a hospital grade pump, but flipping heck I was useless at it!)
I also found, throughout the whole time I breastfed that I needed to eat a LOT of carbs or else my milk supply dropped. The official advice from midwives is to not eat any more food than someone not breastfeeding would need, but that just didn't work for me. I used to devour carbs round the clock.
I also agree with PP about gluing yourself to the bed or sofa for a few days if at all possible to see if you can get just focus on this and get your supply up. I don't think I left the house for the first five weeks of DD's life except to go back to the hospital for three nights when she was first found to have lost weight.