Tainio et al, (Can air pollution negate the health benefits of cycling and walking?, Preventive Medicine, June 2016, Vol.87:233–236), produced a model for cycling (and walking) in polluted cities, using data of one particular type of pollution (fine particulate matter) from various global cities.
Using a measure of minutes per day spent cycling, they find that the health benefits of cycling have a "tipping point" (after which no further benefits are observed) and a "break even point", after which the harm due to pollution outweighs the benefits of the exercise. The authors claim that, in almost all urban environments, the benefits of cycling outweigh the harm. The most polluted city they looked at, Delhi, however, has a tipping point of 30 mins/day and a breakeven point of 45 mins/day, which must make it a pretty unpleasant place to cycle!
The conclusion seems to me to be that if the choice is between cycling and driving, you're better off cycling (for any reasonable distance, such as commuting), because you'll be healthier and causing less pollution yourself. Personally, I like to avoid heavily polluted areas of my city for aesthetic reasons and also because they tend to be busier and slower than the alternatives.