Verb + à + infinitive
avoir du mal
à
The constructions
àavoir du mal à + infinitif
J'ai du mal à me lever le matin.
Do not writeJ'ai du mal de me lever le matin.
Why
Avoir du mal à, avoir de la peine à, avoir des difficultés à: all three take à before the infinitive. The de you see in « du mal » belongs to the partitive article, not to the construction.