A lot of good answers here, most show common sense and good bicycling practice. The only thing I would add is to find a better bike route, as usually there are options.
Long-term, cyclists should be working together to convince the authorities to improve these poorly designed roads.