Which parts of a wrecked bike would be OK to use or sell?
We have no way to know what may or may not have been damaged in the accident, especially without knowing details about the accident and the types of components on the bike. Some parts you likely won't be able to determine if they're still functional until you put them on a different bike and ride on them.

That said, you're not going to get much by selling a lot of those components piecemeal, especially with a disclaimer that it's been in an accident.

My recommendation? Scrap the bike for parts, and keep them around as spares for your next bike. Having a good supply of used parts on hand can be incredibly useful.