curl = Curl[#, {x, y, z}(*,"Cylindrical"*)] &;
elst = e[#][x, y, z] & /@ Range[3];
hlst = h[#][x, y, z] & /@ Range[3];
eq = Thread /@ {curl@elst == -I w mu hlst, curl@hlst == I w eps elst}
eq2D = eq /. (h : e | h)[i_] :> Function[{x, y, z}, h[i][x, y] Exp[I beta z]] /. z -> 0
mid = eq2D /.
Derivative[index__][head_][xy__] :> d[head[xy], Sequence @@ Transpose@{{x, y}, {index}}]
mid2 = Flatten@(mid[[All, 1 ;; 2]] /.
Solve[mid[[All, -1]], #[3][x, y] & /@ {e, h}][[1]] /. eps -> eps[x, y] /. d -> D)