Interesting question.
I think "bailouts" are not really bailouts when they serve the purpose of correcting the market failure of externalities (when a private company creates damage they are not required to pay for, but the public has to pay for). Environmental damage is a good example for that: Often, companies use common goods like water, air and so on, and inflict damage on it, due to pollution -- but they don't have to pay for the costs others suffer due to this damage (at least it used to be that way). The free market is the best system to allocate resources, but in this case, it obviously fails, because those who use a certain good don't need to pay for it, because these goods are considered open, common goods. Yet the costs will have to be paid by someone else (usually the public, by using tax money to clean pollution), either by other businesses which suffer (like tourism industry due to pollution that lowers the value of their resource), or the common citizen who has to breathe polluted air and drink polluted water, which then results in higher degree of illnesses and thus higher doctor bills, yadda yadda.
So when this market failure of externalities takes place, I think it is not an unreasonable distortion of the market when the state/government takes measures to correct this mistake, by making the company responsible for the use of common goods pay for the damage they inflict. In free markets, everybody should have to pay for the resources he/she uses, and when that's not the case because of a lack of legal regulation, the government needs to step in to correct this error.
So when BP is forced to pay for the damage their business has inflicted on the common good of ocean water, this is not interference into the free market, but on the contrary enforcement of the basic free market principle that individual actors have to take the consequences of their actions and pay for the resources they use. That includes payments to businesses affected by the oil spill. How they then use this money is up to them, they are free businesses, after all.
Bailouts for rotten companies, on the other side, are not. When a company is no longer capable of competing on the market due to mismanagement or lack of demand, it would be extremely inefficient to buy it some more time with public money. This money then is missing in other places of the market where it would be used for more efficient purposes, and thus general welfare decreases.