Each state has different laws that address this issue, and you should contact an attorney licensed to practice in your specific jurisdiction for specific answers.
In general, however, the answer will depend on whether your jurisdiction recognizes wrongful death claims as derivative or independent actions. As law professor Dan B. Dobbs has explained, "According to Latin maxim, personal actions die with the person. The common law followed that maxim, holding that the death of either the tortfeasor or the victim eliminated all tort claims. In particular...[i]f the tort victim died, his cause of action was at an end. His estate had no cause of action."
In 1846, however, England enacted a law called "Lord Campbell's Act," which created a right to recover for the wrongful death of a relative. Many state constitutions and laws follow the principles of Lord Campbell's Act and create rights of wrongful death actions.
Your answer depends on whether the jurisdiction recognizes the right of wrongful death as belonging to the estate of the decedent, which may be subject to the will, or whether the right of wrongful death is an independent right that belongs to legal heirs individually, regardless of the interests of the decedent. In most circumstances, the independent rights of the legal heirs would not be subject to the prescriptions of the will.
As to whether or not a court will approve the agreement, it depends not only on the nature of the state's wrongful death action, but also upon the respective positions of the parties to the agreement. If all of the heirs agree and are willing to stipulate to a division of the wrongful death damage award, then a court is likely to approve the agreement. If there is a dispute, however, then the award will likely be impleaded with the court and the interested parties can make their respective arguments as to how the funds should be distributed.
These issues are very legally and factually complex, and this response is intended to be general information only and not legal advice. My strongest advice would be to seek out a competent attorney in your state and get specific answers based on the unique circumstances presented.
Perhaps the fastest way to get an answer to your question is to look in the business pages of your local phone book. Look at the ads under attorneys and call one or two who advertises personal injury or car wrecks AND free consultation. You do not have to hire or pay the attorney who advertises "free consultation."
You should speak with the attorney involved or arrange an office or telephone consultation to get accurate advice based on a full understanding of the circumstances. Nevertheless, the following is from the Illinois statute:
Every such action shall be brought by and in the names of the personal representatives of such deceased person, and, except as otherwise hereinafter provided, the amount recovered in every such action shall be for the exclusive benefit of the surviving spouse and next of kin of such deceased person. ... The amount recovered in any such action shall be distributed by the court in which the cause is heard or, in the case of an agreed settlement, by the circuit court, to each of the surviving spouse and next of kin of such deceased person in the proportion, as determined by the court, that the percentage of dependency of each such person upon the deceased person bears to the sum of the percentages of dependency of all such persons upon the deceased person.