OP I was where you were when my baby was same age. He is now 8 months. He slept and napped really well until his first jabs and then things got so awful, I really don't know how I worked as well with no sleep.
He slept in his cot next to my bed. And often co slept. Also breast fed.
Things drastically improved when I did a version of CIO and moved him to his own room.
He will now settle himself to sleep without me in the room. TBH that happened after about a week of CIO, but that week was hell.
Annoyingly he occasionally goes through the night. So I know he can. But lately I've had to feed him two of three times a night at least. I'm not sure why but he settles himself to sleep at 7 but struggles in the middle of the night. However he does genuinely seem hungry, he is a very hungry baby.
I have no idea if I have done anything wrong at any point.
From what I've read on here luck of the drawer really does seem to be the only answer there is.
Also you mentioned changing to formula. My DS is combo fed and it's made no difference. Neither has going on to solids. I really need to wean him off the boob (working FT etc) but still don't want to, if better sleep comes as a result of it I will be amazed and chuffed which may soften the blow a bit.
Hang on in there. Lack of sleep is shit and does weird things to you