Summarize the following:
Nails that have separated from their nail beds are vulnerable to injury. Ask your doctor if they can remove the separated part of the nail for you in-office. Removing the nail on your own may result in pain, infection, or further injury. If you have an infection under your nail, removing it will allow you to apply the medication directly to the site. Before your nail can grow back, the fungus and bacteria under the nail must be killed. After diagnosing this kind of infection, your doctor will prescribe an oral or topical antifungal medication to treat it.  Take or apply the medication exactly as directed until a new, healthy nail begins growing in.  Oral medications should be taken for 6-24 weeks depending on the severity and nature of the infection. Topical creams or ointments should be applied daily around the nail bed and are usually slow to produce results. Oral medications are generally more effective than topical ones, but carry additional risks such as potential liver damage. Follow up with your doctor after 6-12 weeks of treatment. Psoriasis is a common cause of onycholysis that has a number of possible treatments. Discuss treatment options with your doctor to decide which one may be most effective for you. These options may include:  Oral medications like methotrexate, cyclosporine, and retinoids Topical treatments like corticosteroids, synthetic vitamin D, anthralin, calcineurin inhibitors, salicylic acid, and topical retinoids Light therapy treatments, such as UVB phototherapy, narrow band UVB phototherapy, and excimer laser therapy Alternative, natural treatments like aloe vera, fish oil, and topical applications of Oregon grape A lack of vitamins and minerals may leave your nails weak and brittle, making it more difficult for them to regrow after onycholysis. Ask your doctor if you should take supplements to help your nails regain strength. Iron in particular may help to strengthen your nails.  Biotin, a B vitamin, can also help to improve the condition of your nails. Taking a daily multivitamin will help to guarantee that you get an assortment of vitamins that your body needs for overall health. Your doctor may also suggest dietary changes to increase your intake of certain vitamins and minerals. To protect your nails from excessive moisture while they are healing, apply a drying substance to them after getting your hands or feet wet. Ask your doctor if they can prescribe a drying agent such as 3% Thymol in alcohol. This kind of liquid drying agent should be applied directly to the nails with a dropper or small brush. These drying  agents should be used for 2-3 months while your nails are healing.

Summary:
Trim back the nail to prevent further trauma. Use an antifungal medication if the onycholysis is caused by a fungal infection. Ask your doctor about treatment options for onycholysis-causing psoriasis. Ask your doctor about supplements if you have a vitamin and mineral deficiency. Treat your nails with a prescription drying agent after they get wet.