A mim bearing shaddah (ّ) is called mim mushaddad. It is read as one reinforced consonant with required ghunnah. The shaddah represents two underlying positions, a still mim followed by a vowelled mim, but in fluent recitation they form one connected doubled articulation.
«ثُمَّ»
Then. Its doubled mim carries measured nasal resonance.
«لَمَّا»
When. The doubled mim retains the nasal sound.
Do not split it into two detached consonants, and do not eliminate the ghunnah. The closure of the lips and the nasal resonance must work together.