There are several ways to go about this.
- You can inform the airline in advance that you intend to terminate at point D. By doing this, however, they may demand that you modify your ticket to terminate at D. This in turn may well result in a higher fare and/or a change fee, strange as it sounds; such is commercial aviation.
- You can simply no-show at point D. They will page you for a while. After a certain cutoff time, they will give your seat to the next standby passenger on the waitlist, if there is any, and leave without you.
- I go to the departure gate for my D-A flight and inform the gate agent there that something has come up, and I will not be able to get on the flight. No one has ever pressed for a reason; it's none of their business really, but more to the point it's a busy time for them. Telling them saves them from wasting time trying to page me before closing the door, and lets them process any standbys a little bit faster.
Naturally, I would recommend option #3.
If you miss any leg of a flight, all subsequent legs are canceled automatically; this is a standard rule across all major airlines. Still, given the vagaries of airfare pricing, many people do deliberately book final legs they do not intend to fly, a tactic known as hidden city ticketing. This is technically in violation of your contract with the airline, and you could lose frequent flyer miles or status over it, though it's only enforced in fairly extreme cases.
The larger danger comes from ordinary operations. Your Contract of Carriage (or Conditions of Carriage) with the airline is to get you from A to C and from C to A. They can, at their discretion, change your return flight from C-B-D-A to C-B-A or C-F-A or some such, bypassing D altogether.
As for frequent flyer considerations, you will not receive any miles or segments for flights you do not fly, as a general rule. They base whether or not you fly on whether or not your boarding pass was scanned. In your example, you can still expect to receive miles for A-B, B-C, C-B, and B-D, just not D-A.
To head off a potential followup, no, you cannot have your boarding pass scanned and then leave. The flight attendants do a head count prior to closing the door, and after they determine that a passenger has left the flight, at a minimum your boarding will be canceled, and worse, airport security and/or law enforcement may want to question you.