If it is not structural, you can pour something like Minwax wood conditioner over it - it wicks into the wood and stiffens what's left. Then you can fill it with an epoxy filler. Some, like the Minwax, claim to be stainable, if you have natural wood showing; all are paintable.
If you use epoxy filler, build it up with several applications. It's a lot easier to add to it than to take it off.