Medicare is not affected at all; each Medicare recipient has individual coverage through the program. The same is true with private Medigap policies.
However, if you received health care benefits as part of your spouse's retirement package from a former employer, your coverage may be affected. It is up to the plan to set guidelines for coverage of surviving spouses. Check with the plan administrator for details.