I've never seen what I would call a definitive article on the comparison, there is just too much subjective bias in almost anything you'll likely read. It comes down to buying something that is suited to purpose, that you can afford, and meets your priorities. This is also strongly influenced by whether we are talking old vehicles or new vehicles, as a lot has changed in the past 10-15 years.
Off the top of my head for comparison factors are fuel economy, longevity, emissions/footprint, towing/hauling, and total cost of ownership. All of this changes depending on what specific engine you look at, not just the fuel type.
Fuel economy is the one everyone initially jumps on, but the difference has narrowed slightly on more recent >2007 models with diesel exhaust after treatment systems. The particulate filter introduces more back pressure, as well as requiring some fuel to be burned to regenerate the filter both of which have a negative impact on economy. The EGR systems also decrease overall engine fuel efficiency. Diesel is more efficient per mile in any vehicle where there is a choice between the two. Turbocharged gasoline engines generally get closer on the economy numbers, especially under light loading due to decreased engine displacement.
Longevity almost always goes towards diesels regardless of generation. They turn lower average revolutions per mile/hour and are made of heavier components due to higher peak cylinder pressures. However, many non-turbo gasoline engines have been getting much better in the longevity department over the same time frame diesels have been seeing similar or slightly decreased lifespans from added emissions maintenance and associated failures. Diesels do not suffer as prominently from turbocharging, the heavier materials generally tolerate the added heat and stress for longer periods between rebuilds and failure. Consider that most personally owned vehicles are scraped or traded before they reach engine end of life. RVs/vans could be the exception, depending on the consumerist tendencies of the owner.
Emissions is where diesel usually get a bad rap. Older diesels gave a reputation of smoky, dirty fumes, and polluted a great deal of particulates, sulfur dioxide and nitrogen oxides into the air. These are of great concern in high density developed areas where smog and overall concentrations of these compounds are higher. New diesels, and ultra low-sulfur diesel at the pump, have mitigated these issues and (assuming it's not a VW diesel) now meet the same basic emissions requirements as their gasoline counterparts.
However, the most concerning exhaust gas over the long term, carbon dioxide, diesels are the better choice in all cases. They produce the fewest grams per mile of any internal combustion engine, and fewer particulates when comparing modern engines. Direct injection gasoline engines in particular produce far more particulate emissions than a modern diesel fitted with a particulate filter.
Towing and Hauling are nearly exclusively diesel in commercial applications, but not so in the consumer space. Turbo gasoline vans have been cropping up in the light truck/van market and have very nice ratings. Even the larger V8 and V10's are no slouch. If you want maximum reliability and run heavy often or long miles, you'll probably want to tend towards the same decisions the commercial operators make.
Total Cost of Ownership is usually not in favor of diesel vehicles for personal use vehicles. They do not run enough miles per year to pay for the more expensive up front costs, and more strict maintenance requirements often found with a diesel vehicle. This does vary considerably, however. A Dodge/Cummins 5.9L, Ford/International 6.9/7.3L IDI from the 80's/early 90's or a GM 6.2/6.5L are very economical engines to maintain, there is no fancy exhaust parts to wear out, and the injection pumps and injectors are much, much cheaper than modern unitized or common rail fuel parts. Diesel fuel is also more expensive in many areas of North America, partly negating the fuel economy savings you might expect. Some people do recoup the up-front price difference with the better resale value on a diesel. 9/10 times people buy a diesel for the other advantages - so if money is tight, I strongly caution against it. The last thing you want to do is buy a diesel and scrimp on maintaining the relatively expensive drive train because you don't have the money.
Just to make clear my bias, I can only buy a diesel vehicle if one is offered, it's a sickness. As far as I know, incurable. Oh well!