I think the first step is to acknowledge that you pursue fame, and that most other people do so as well. You're not alone. It is a human tendency to seek wealth, fame and attention. However, you have to realise that even when you have these things, there are still real life examples that show you that people who have a lot are not necessarily much happier. A lot of people kill themselves despite being famous and wealthy. How come?
You also have to realise that other people and your current status viewed by other people are impermanent and not completely in your control. You can certainly influence others to behave in a different way, but there is no absolute guarantee that you will succeed. You need to have these or similar thoughts ready at hand when you encounter a thought or event that drags you into the fame path, else you will follow your old patterns of thinking and behaving. Initilially when you do this, your emotions will largely bias your thinking and your subsequent behaving; so you have to accept that your mind will be distorted for a while. Here you have to employ patience and the wisdom that it takes some time to cool off thoughts and emotions (insight into mind & impermanence). Of course not only can you remind yourself to think differently, you can also question your old habits in their truthfulness and usefulness. Whilst doing that, you should also try to behave differently; according to your desired goal. So if you want to diminish "fame-thinking" you have to focus on its positives and negatives but put more importance on the disadvantages (don't kid yourself saying that there are only negatives in fame, for if that be the case, no one would ever pursue it).
You should also pay attention to fame/attention seeking behaviours and try to delay the response, change it, or simply leave the situation. Do so in a sensible manner and do not overwhelm yourself unnecessarily with strong emotions since it takes time to undo old habits of thinkind behaving.
All the best