I had this problem after my second was born (she is now 5 months). Her feeding cues were and are crap, non-existent almost, and she didn't seem to want to feed as often as everyone else's babies (I have severe oversupply and overactive let downs, so she never ever comfort nurses). I had a total breakdown over it when she was about 4 weeks old. I was just so upset that I couldn't read her or work out what she wanted, and so depressed that I was having these problems all over again (had similar issues with my first, but thought lightning wouldn't strike twice!). I couldn't eat anything, couldn't stop crying, and had such severe anxiety whenever I put her to the breast that the few times I got it right and she was actually hungry, I was so worked up that I couldn't have a let down for her, leading to her going insane with fury and let downs taking 15 minutes+ to achieve (I usually have one within about 15 seconds lol). I also said exactly the same as you - I don't know what I am doing - over and over again to my OH and mum and anyone who would listen. The lack of control over what was going on was horrific.
For me, there was no quick fix. I just tried to feed her as much as I could when she was drowsy and relaxed, as she did so much better then. She was such an agitated, jittery little newborn when she was awake and alert. I ditched the idea that newborns want to feed all the time, as for my non-comfort-nursing baby that clearly wasn't the case. I stopped trying to feed her every time she cried as it was making me miserable. I also stopped getting her weighed and tried to just count wet nappies and judge her health by how she seemed in herself. Eventually, we found our groove and although she still has zero feeding cues and still hates my boobs unless she is starving, I'm confident she's ok and will not let herself go hungry. I'm still a terrible clock-watcher and always will be, but I no longer feel like I am going to have a panic attack if four hours have passed and she's not desperately hungry. And she was like this from very early on, it's not something that has come with age. Almost from the beginning, she would go 4-5 hours without wanting anything to do with the breast.
Give yourself a break and don't worry too much. Your baby has been ill - that's the most likely explanation for her small weight gain recently. She will make it up. They are so good at regulating their needs, even if it doesn't fit with what we think they should be doing or help our anxiety in any way. Sadly, they don't operate like clockwork, although it would be so much better if they did!
Anyway, I know it's impossible feeling how you are right now, as I've been there, and the crashing hormones and full boobs make you feel completely insane. It sucks sucks sucks. But I promise, in a few months or less, things will be completely different and you'll have moved onto something else. For us, it's now teething! Booooo.
Hang in there. You're doing a good job, even though you maybe can't see that right now.