Gesenius' Hebrew Grammar
The originally interrogative מָה is used to introduce exclamations of wonder or indignation = O how! or ridicule, why! how! sometimes strengthened by זֶה or זֹאת according to §136c.—Astonishment or indignation at something which has happened is introduced by אֵיךְ how (likewise originally interrogative) with the perfect; the indignant refusal of a demand by אֵיךְ (but also by מָה Job 31:1) with the imperfect; an exclamation of lamentation by אֵיכָה, less frequently אֵיךְ how!; in Joel 1:18 by מָה.
מָה (or מַה־ with a following Dagĕš, see § 37) expressing admiration (or astonishment) before verbal-clauses, e.g. Genesis 27:20 (מַה־זֶּה); 38:29, Numbers 24:5 (how goodly are...!); Psalms 21:2, Song of Solomon 7:2; before the predicate of noun-clauses, e.g. Genesis 28:17, Psalms 8:2; mockingly before the verb, 2 Samuel 6:20 (how glorious was...!); Jeremiah 22:23, Job 26:2 f.; indignantly, Genesis 3:13 מַה־וֹּאת; 4:10, 20:9, 31:26 what hast thou done!
אֵיךְ with the perfect, e.g. Genesis 26:9, Psalms 73:19; in scornful exclamation, Isaiah 14:4, 12; in a lament (usually אֵיכָה), 2 Samuel 1:25, 27; with the imperfect, in a reproachful question, Genesis 39:9, Genesis 44:8, Psalms 11:1, Psalms 137:4; in a mocking imitation of lament, Micah 2:4.
אֵיכָה with the perfect, Isaiah 1:21, Lamentations 1:1; with the imperfect, Lamentations 2:1, Lamentations 4:1.
Rem. 1. The close relation between a question and an exclamation appears also in the interrogative personal pronoun מִי in such cases as Micah 7:18 מִי־אֵל כָּמ֫וֹךָ who is a God like unto thee? and so in general in rhetorical questions as the expression of a forcible denial; similarly in the use of an interrogative sentence to express a wish, see §150d, 151 a.
2. A weaker form of exclamation is sometimes produced by the insertion of a corroborative כִּי verily, surely, before the predicate, Genesis 18:20; cf. 33:11, Isaiah 7:9, and the analogous cases in the apodoses of conditional sentences, § 159 ee.