Such a situation will only arise if you violate sovereignty of Pakistan or you attach Makkah/Medina in Saudi Arabia. If these aren't the cases, nukes won't be used.
Pakistan isn't adopted son of China. It doesn't hold true. The reason is Pakistan played a vital role to bring China in the mainstream, specially, linking US and China.
Whereas, Israel hasn't achieved anything like that for US. Israel is a defense liability for US. There is a reason why Obama administration had distanced itself from Israel.
I agree, Pakistan is a struggling state, calling it failed state shows your lack of awareness. When superpowers are behind a developing nation, what do you except that country to achieve? US wants to destabilize Pakistan along with its NATO homies. India is another country that has joined hands to make Pakistan a failed state but nothing has been achieved.
Could Israel resist if US had wanted to bring it down? I'm 100% sure, Israel won't have lasted a year if US had decided to make it a failed state. However, Pakistan has survived that for more than a decade now. Understand the difference.