To get your energy back, you have to do little or no calorie restriction, 500 calorie deficit tops. I'd say start first with no calorie deficit (even if it's hard on a fat diet because you feel full) and see if that improves it.
For the headaches and the rest, you have to up your electrolytes: sodium, potassium and magnessium. Your body on ketosis will excrete much more of them than usual. Occasionally I get a pretty bad headache that goes away with 1/2 a teaspoon of salt, sometimes even more.
Let me guess... pretty bad headaches and maybe what feels like palpitations, specially when laying down?