Middle English delen, from Old English dælan "to divide, distribute, separate;" hence "to share with others, bestow, dispense," and also "take part in, have to do with," from Proto-Germanic *dailjanan (source also of Old Saxon deljan, Old Frisian dela "to divide, distribute," Middle Dutch, Dutch deelen, German teilen, Gothic dailjan),from PIE *dail- "to divide," perhaps a Northern Indo-European extended form of root *da- "to divide," or a word from a substrate language.
Meaning "to deliver (to another) as his share" is from c. 1300. Meaning "to distribute cards before a game" is from 1520s (the associated noun meaning "distribution of cards before a game" is from c. 1600). Hence colloquial deal (someone) in "include in an undertaking" (1942).
To deal with "handle, act toward (in some way)" is attested from mid-15c., from the notion of "engage in mutual intercourse, have to do with;" in late 14c. the phrase also mean "have sexual intercourse with." Related: Dealt; dealing.