What is the correct way to notate the word "didn't" if the "di" part correspond to one note and the "dn't" part correspond to another? Being a non-native English speaker I feel like I should write "di-dn't", but references give me mixed answers about the number of syllables in this word. Should I use the hyphen (and if so, how to divide into syllables?) or should I use the underscore (extension line melisma notation), like "didn't _"?
In cases like this, it's best to consult a dictionary to determine the official syllable breaks for these words. Even as a native English speaker I have to do this sometimes!
Merriam Webster actually breaks the syllables as di-dn't, which is not what I expected. (This is the blue text underneath the word at the top of the page; the hyphens indicate syllable breaks.) But then they also include did-n't as a possibility...and they even have a one syllable option!
Since Merriam Webster shows all possibilities, I would personally recommend did-n't; somehow that seems more intuitive to me. But when a dictionary only has one option, definitely go with that one.
So, there is actually a rather comprehensive set of rules regarding syllabification in music, and it differs immensely from standard dictionary syllabification. Dictionaries are made for giving definitions of words and are concerned with etymology and word roots and such. The rules for musical syllabification are made to be the most useful to a singer reading them and are thus, often rather different. The rules are not set in stone, but generally, you should follow them when possible. You can find a great rundown in Elaine Gould's Behind Bars. I've copied the relevant passage (p. 243) below for you on syllabic consonants.
In this case, as with the example of "couldn't" given by Gould, "didn't" should indeed be "did-n't."
Also, to address the second part of you question, definitely go with a hy-phen and not a word extension___ if you want one syllable sung on one note and the other sung on another. If you did it with a word extension, it would mean that the first syllable is sung on both notes, and the "dn't" would be squeezed in there at the last possible minute. Neither result is wrong, but since the result you want is two syllables on two different notes, a hyphen it is.
For sure there are two syllables in the word "didn't." Even in the extended version of this word, there are two one-syllable words ("did not"), which add up to a total of two syllables. I would say that the best way to notate this is "did-n't." This is due to the fact that the first syllable of this word is "did" and the second syllable is the "n't." When was younger, I was taught to clap when I said each syllable and this helped me to figure out where the syllables are in words.