There isn’t a lot of evidence for the use of diet to treat skin conditions, but some research shows a relationship between food allergies/sensitivities and eczema. In this case, working with a nutritionist to identify your trigger foods could be beneficial.
In addition, eczema is an inflammatory condition, so following an anti-inflammatory diet (such as the Mediterranean diet) could theoretically be helpful. However, this has not been well-researched.