Well given that in OTL there was a great deal of tension regarding Tyler's "ascension" to the Presidency, I'd wager that a similar type of tension would emerge upon Madison's death in TTL 1815/1816.
IMO the outcome would be different depending on when exactly he died. I think that in 1815 given the fact that both the President and the VP are dead the overwhelming opinion would to be to have an emergency election to elect a new President. (In OTL this was the prevailing opinion for quite some time during Tyler's initial months of the Presidency) John Gaillard would become Acting President until a new election could be called to elect a new POTUS/VPOTUS. This could possibly set the precedent for Presidential succession being handled by emergency elections held as soon as possible potentially providing for interesting election dates etc.
However If Madison dies in 1816, I think that the upcoming election in November would influence legislators to allow Acting President Gaillard to serve out the remainder of Madison's term to ensure electoral continuity. He would probably be barred from running in the 1816 elections if not legally, then by popular opinion. This would lead to the precedent of Presidential succession being handled by his successor taking the title "Acting President" and serving the remainder of the President's term before resigning upon the election of a new President thus getting rid of President's like TR and LBJ, Truman, Coolidge, who ran for a successive term after their Presidents were assassinated/died.
At any rate the succession act would probably be clarified somewhat afterwards.