Well before we get to the nutrition part, I would first address why you are doing this for the 20th time. If you have been down to 7% body fat it sounds like you know how to burn fat.
Something must go haywire psychologically and I’m not sure I have enough information and is probably beyond the scope of answering on a message board. Or maybe I’m reading into it too much and you just added to much fat when you were looking to add muscle.
You probably know that you have to keep your protein intake up, consume moderate amounts of good fats, and adjust/lower your carbs to start getting your body fat down. Once you get your body fat down you can then start adding some extra carbs into your diet to start adding muscle.
This is the short answer. Keep in mind you can’t and won’t “diet” forever so you need to learn how to add some extra calories to your nutritional intake without losing will power and binging when the diet is over.