It is said that in exerting four right efforts, one should try to replace unwholesome thought with wholesome thought.
Example, one should think of loving-kindness when ill-will thought arises.
So what should one contemplates for mana?
Here's what the early texts say:
He should develop the perception of inconstancy so as to uproot the conceit, 'I am.' For a monk perceiving inconstancy, the perception of not-self is made firm. One perceiving not-self attains the uprooting of the conceit, 'I am' — Unbinding in the here & now."
-Ud 4.1, AN 9.1, AN 9.3
"When a monk's awareness often remains steeped in the perception of not-self in what is stressful, his heart is devoid of I-making & my-making with regard to this conscious body and externally with regard to all themes, has transcended pride, is at peace, and is well-released. If, when a monk's awareness often remains steeped in the perception of not-self in what is stressful, his heart is not devoid of I-making & my-making with regard to this conscious body and externally with regard to all themes, has not transcended pride, is not at peace, and is not well-released, then he should realize, 'I have not developed the perception of not-self in what is stressful; there is no step-by-step distinction in me; I have not arrived at the fruit of [mental] development.' In that way he is alert there. But if, when a monk's awareness often remains steeped in the perception of not-self in what is stressful, his heart is devoid of I-making & my-making with regard to this conscious body and externally with regard to all themes, has transcended pride, is at peace, and is well-released, then he should realize, 'I have developed the perception of not-self in what is stressful; there is a step-by-step distinction in me; I have arrived at the fruit of [mental] development.' In that way he is alert there.
-AN 7.46
Venerable sir, how should one know, how should one see so that, in regard to this body with consciousness and in regard to all external signs, I-making, mine-making, and the underlying tendency to conceit no longer occur within?”
“Any kind of form whatsoever, Rahula, whether past, future, or present, internal or external, gross or subtle, inferior or superior, far or near—one sees all form as it really is with correct wisdom thus: ‘This is not mine, this I am not, this is not my self.’
“Any kind of feeling whatsoever … Any kind of perception whatsoever … Any kind of volitional formations whatsoever … Any kind of consciousness whatsoever, whether past, future, or present, internal or external, gross or subtle, inferior or superior, far or near—one sees all consciousness as it really is with correct wisdom thus: ‘This is not mine, this I am not, this is not my self.’
-SN 22.91, SN 22.92
Conceit doesn't convey the full meaning of 'Māna' in Buddhism. 'Māna' is measuring. You can measure yourself against others in three ways,
- I am better than him
- I am worse than him
- I am equal to him
However, I assume your question is on conceit, so here are some methods discussed here to tackle conceit, some of them are applicable for mana as well. On a practical aspect, the 4th and 1st methods have been very helpful to me whenever conceit arises.
- Recognize Conceit whenever he pops up and name him. This as readers will remember is the advise given by Nyanaponika Thera in his valuable articles in "Sangha". Mara, like Satan, hates to be recognized. This practice is doubly effective because it "keeps one on one's toes," and induces a real dislike of the tendency.
- Get back to the first two "steps" of the Noble Eightfold Path (a) Right Understanding of the mental quality or capacity involved: to see according to reality "This (quality) is not mine; I am not this; there is no self in it" (b) Right Aspiration towards the expunging of Conceit.
- The method of analysis is also helpful. "I" am being praised for some real or imagined virtue, say generosity. Generosity is non-greed (alobha) one of the Good Roots, and as such appears in the list of dharmas given in the Abhidharma philosophy. According to Mahayana "All dharmas are empty of own-being" — that is to say they are non-existent. Therefore "I" am being praised for something which doesn't exist. This is so absurd that it knocks the bottom out of my conceit
- Alternatively "I" am the result of past kamma. My talents are not due to my own virtue, but have arisen on account of the skilled actions performed by vanished personalities whose kammic descendant "I" am. Therefore it is silly of me to be conceited about qualities which are not in any real sense "mine."