Madara stated he obtained the rinnengan just before hes death which is basically saying that he got it and probably died from it, seeing that he does not contain the pure blend of senju and Uchiha dna, altho hes ability with the rinnengan and the powers that come with it suggest that he did some time to train with it, and also he was defeated before the obtained the rinnengan by the 1st but no where was it confirmed that battle killed him. My guess is he lost but obtained the 1st's dna and try blending it with his own and only got a partial blend, which gave him the eyes (rinnengan) of the sage of 6 paths but didnt give him the "body" to handle it and thus killed him a short while after getting it.