The only online register of German death records I am aware of is provided by Das digitale historische Archiv Köln (you can search it using a newly created indexing project) and covers deaths between 1938 and 1978 in the city of Cologne.
You need to establish a place of residence and narrow down the possible time of death first before doing research offline. This means: Contacting the local registration office and/or local archives (since 2009 death records can be given to archives 30 years after they were closed ) and ask them to look for the record. The fee depends on the time needed by the staff to trace your records, so you better do as much research as possible before asking.
Maybe it helps to look in city directories of certain cities or regions to find your ancestor. A lot of these books are available as pdf files on the internet from local libraries, you can try to locate them using these categories (looking for the city, then the year). If you are lucky and find your ancestor you might also narrow down the time of death when he isn't mentioned in later address books anymore.
You can also search a database containing records from address books, but I am afraid it doesn't cover enough places and years.
If your ancestor died in World War II, you might find his grave using a specialized search engine provided by the Volksbund. Using the meta-search by genealogy.net (Verein für Computergenealogie, the largest genealogy association in Germany) you also can look for other graves that were recorded over the last years. Please note that most graves don’t exist longer than a few decades on burial sites in Germany.
Maybe we can help you here as well narrowing down your research if you can provide more details like name, region, occupation, birth year and/or participation in World War II.
Good luck!