If you try losing weight by largely cutting down on carbs (largely processed sugars and grain products) and bad (saturated and processed) fats but at the same time increasing consumption of good fats (fish, nuts, avocados, unprocessed vegetable oils) and good proteins, you should not experience muscle loss or material reduction in EQ. The body may take a couple of weeks to re-program hormone secretion, during which EQ may be temporarily f*d up, but after that everything should improve.
Extreme dieting, like fasting or veganism, will reduce your EQ and sex drive and will cause both muscle and fat loss, maybe including some in penile tissues. Not trying to offend vegans here - they do have sex and sex drive too in the long run. Also, intermittent fasting is excellent and does many good things.