There are two ways to treat a comb that has been scalped. If you catch it right after it happens you can clean it well to remove all bacteria and then "glue" it back to the scalp with triple antibiotic ointment, then spread the ointment over the top to hold it down.
But you cannot do this if the scalp and torn comb have dried out or turned black. That tissue is nonviable. You will need to trim it. You must do this or the chickens will tear it all the way off. This is a very simple and safe procedure.
Ice the comb. This will reduce the pain and bleeding. If you have styptic powder put that on after you trim the comb. Or use sugar or corn starch to curb the bleeding.
Use sharp scissors and trim as much of the comb as possible that has turned black. People do this to combs all the time for many reasons. It will heal very quickly, and the pain will subside in a few hours. The chicken can handle it.