Praise be to Allah.
1 – If a person singles out an udhiyah then it dies, without any negligence or transgression on his part, then he does not have to do anything.
If the udhiyah that is in his possession dies without any negligence on his part, or is stolen, or wanders off, then he does not have to do anything, because it is a trust that was in his care, and he is not liable for it if he was not negligent, as is the case with items entrusted to one’s care. End quote. See: al-Insaaf by al-Mirdaawi (4/71)
2 – If he or someone else destroys it, then the one who caused its destruction is liable to repay its value or replace it.
Ibn Qudaamah (may Allah have mercy on him) said in al-Mughni (9/352):
If he destroys an obligatory udhiyah, then he must repay its value, because it comes under the heading of things that have value; what counts is its value on the day that it was destroyed.
Once this is clear, you do not have to do anything, because you did not destroy the udhiyah, and you were not negligent in caring for it.
With regard to what you slaughtered after that with the intention of offering the udhiyah (i.e., the sheep), this is something good and you will be rewarded for it, in sha Allah, although you did not have to slaughter something instead of the one that died. But as you did that, it was a voluntary act, and extra good on your part, in sha Allah.
There is nothing in the fact that your udhiyah died to indicate that it was a kind of deprivation or divine punishment to you, or any such thing. Rather, who knows? Perhaps it was a test for which you will be rewarded, in addition to your previous efforts to do good, then Allah enabled you to offer another udhiyah instead of the one that died. All of this is an increase in goodness and divine favour to you, in sha Allah.
Shaykh al-Islam Ibn Taymiyah (may Allah have mercy on him) said:
If, in addition to having firm resolve, the individual does whatever he is able to, then according to Islamic teaching, he is equal in status to the one who does the action in full, and he will have the same reward or punishment as the one who did the action in full and did everything he intended. So he (the one who did as much of the deed as he was able to) will be rewarded or punished even for what he failed to do (but intended to do if he was able), like those who cooperate and help one another in doing righteous deeds.
End quote from Majmoo‘ al-Fataawa (10/722-723). See also: Majmoo‘ al-Fataawa (23/236)
We ask Allah to accept from you and from all the Muslims.
And Allah knows best.