Jesus tells us to give alms secretly, pray privately, and fast inconspicuously (Mt 6:3, 4, 6, 18). Then the Church etches big black crosses on our foreheads to proclaim a fast. Although this seems to contradict the gospel, this is in accord with the message of Joel, who tells us to "blow the trumpet in Zion! Proclaim a fast, call an assembly; gather the people, notify the congregation" (Jl 2:15-16).
Lent and life are times both of private intimacy, commitment, and discipline, and also of public confession, exhortation, and inspiration. Our lives are hidden now with Christ in God (Col 3:3), but we are His witnesses even to the ends of the earth (Acts 1:8). We're not to blow a horn looking for applause for ourselves (Mt 6:2), but we are to blow a trumpet in applause for the Savior (Jl 2:15). We sometimes pray behind closed doors (Mt 6:6), but we're not ashamed of the gospel (Rm 1:16). We are to unlock the doors of the upper room, run out into the streets, and acknowledge Jesus before men (Mt 10:32).
Yet how do you know when to act privately and when to act publicly? Do the opposite of what you fear. For example, if you're afraid to pray publicly, pray publicly. Also, privatize some things for which you get a lot of recognition. This insures that you're not just a people-pleaser but pleasing to God. The Holy Spirit will teach you what to privatize and what to publicize.