Gosh, that sounds extremely difficult, I really feel for you. We have just gone through similar with our LO, although she's only 17 months and thankfully still in her cot.
She would go to sleep fine, but as soon as she woke in the night she was hysterical whilst in her cot. We were up 4+ hours with her each night. We did revert to cosleeping but even then she just flung herself around the bed laughing, poking us etc. I decided last week to tackle it.
For us, the main issue was that she didn't want to be in her cot. I sat in her bedroom floor for 3 hours on Friday night until she finally dosed off. I sang to her, then shh'd her and patted her (slowly withdrawing each one) until she fell finally fell asleep. The next night she didn't wake until 5am and I started with the same tactic thinking I needed consistency but it quickly became obvious she wouldn't go back to sleep quickly so as it would be time to get up by the time she'd fallen asleep, we decided to revert to controlled crying. It really wasn't something I wanted to do but after a couple of nights she quickly improved and has slept through for 3 nights now.
Whilst we were doing it, we started waking her up after an hours sleep as she was in a cycle of bad nights sleep, long day time nap, less sleep needed at night etc.
We were lucky she's still in her cot - I'm sure if not we would have found it much more difficult as she would be out of it in a shot. I'm also under no illusion she's now 'fixed' and I'm concerned the slightest thing may tip the balance again.
For us, consistency was the key. It's extremely hard in the middle of the night when you jus desperately want to go to sleep though, I know.
HB may be right though - it may just be time to call in the professionals. I don't envy you, lack of sleep is awful 