Short answer: You needn’t worry about “needn’t”.
“Don’t need to” and “needn’t” are both present tense, and have the same meaning, but “needn’t” is less common (especially in America).
“Didn’t need to” and “needn’t have” both refer to the past. “Needn’t have” can be used to clarify that the action was in fact performed unnecessarily. “Didn’t need to” is ambiguous as to whether or not the action was in fact performed. In the US, we rarely say “needn’t have”. In fact, “needn’t” and “needn’t have” are even going out of style in British English these days.