Electronic readers frequently go to D sharp rather than E flat, even though E flat is a much more common key for pieces (in the major dealing with only 3 flats rather than, ouch, a key with all sharps and two double sharps!!!! – you just wouldn’t see this as a key signature)... So think of it as E flat minor. (heck, you could even de-tune the guitar to this!)
Minor keys work a bit differently, and you already seem to understand that there is a difference between the melodic scale and the harmonic scale (for this case, ignore the pentatonic minor or any others for that matter)... But the real answer to your question is in the names of those two scales. The Melodic scale, (raised 6th and 7th on the way up but flattened on the way down) refers specifically to notes in the Melody line, the tune. The notes in the harmonic minor scale, same on the way up as it is down, relate to the harmony, or the accompanying chords if you will.
Melody lines move from left to right – they’re notes following one after another.
Harmony is vertical – it is the notes at any given single point that accompany the melody note.
So if you play the melody line on your guitar, you will probably notice that when the music ascends, you’ll have a sharpened 6th and 7th, and when it comes back down they’ll be flattened (for non musos, just think of Greensleeves…)
But if you are playing chords to accompany it, then they will follow the harmonic scale notes.
Gosh, I could go on and on! Feel free to ask more if it’s of any help!