@ankara-- Are you sure it's a fungal infection? It could also be due to psoriasis. It happened to my boyfriend.
If it is because of a fungal infection, you can use tea tree oil or apple cider vinegar. But if it's serious, you have to see a doctor. The pus might require draining or the nail might have to be partially removed. Especially if you're a diabetic or have circulatory problems, you cannot delay treatment for this. The infection might spread.