In what contexts is it important to maintain your accent or dialect?

Solution 1:

If you don't come from London then I don't think you should try to speak like you come from London. If you are representing a company then I think your primary obligation is to be understood, which may involve easing up on the idioms.

Solution 2:

From a non-native English speaker point of view:

I guess my accent will always be Brazilian. I'm not sure if I could or should try to change that.

It's clear to me that accent and pronunciation are two different things, even though I'm not sure where exactly the line that separates them is. (Maybe this would be an interesting separate topic here.)

Anyway, given that pronunciation is not really accent, I'd say that the way that I pronouce the words, as well as the words that I choose should match the ones of the place where I am in, because I will be better understood this way.

Now, if I went to Portugal, I wouldn't try to speak Portuguese like a Portuguese. I would still speak Portuguese like a Brazilian, since in this case I would be speaking my native language. I would however avoid phrases that are spoken in Brazil only to make sure that I could be understood.