Sent into bat, Dhawan (94) and captain Virat Kohli (48) led India's recovery in a 97-run second-wicket partnership, before Mendis, more than three years after his mystery was decoded by the Indian batsmen, came back to trouble them with figures of 4/60 at the Khan Shaheb Osman Ali Stadium.
Mendis castled Kohli and Dhawan with his carrom ball while offspinner Sachitra Senanayake scalped 3/41 as India's new-look middle order sorely missed Mahendra Singh Dhoni.
Ajinkya Rahane (22), Ambati Rayudu (18) and Dinesh Karthik (4) looked good but could not covert their starts, while Stuart Binny did not trouble the scorers after being out for a zero.
Having come into the limelight with his career-best 6/13 against India in Karachi in 2008, Mendis got a reality check after the currently out-of-favour Vireder Sehwag unleashed his fury on him the next year.
Also Read
But that was then and on this day Mendis, who was included in place of medium pacer Suranga Kamal, did not let the Lankans down.
Sharma, particularly, struggled against the odd ball as Sri Lanka, who were playing with three specialist spinners, brought on offie Senanayake in the sixth over.
Lanka seemed in perfect control, conceding only 37 runs in the first power play which also yielded Sharma's wicket.
After all his struggle, Sharma'a anxious stay finally came to an end when he got to out to a dubious decision. Umpire Nigel Llong ruled the batsman out despite being long way down the track.
At the other end, Dhawan looked to have got his fluency back and Kohli's reassuring presence further calmed the left-hander's nerves.