i would file or cut back most of it...(as much as possible without damaging the nailbed) maybe even visit a professional for it and then apply vinegar-essence. I dont knwo what its called in english but here in germany we have something very strong. Called Essig Essenz (vinegar essence). Its not regular vinegar. Its acidity is much higher.
Apply it 2-3 times per day on the remaining nail. It should stop the fungus. And the new nail should grow healthy.
I dont know though if the nailbed is already infected, if it also works on the nailbed.
But i used to have 1 quarter of a nail infected and got rid of it with this venigar essence