Don't feel discouraged. Yes, these hooves look terrible, but with some good trimming he will come around! To me the hole in the sole looks like simply overlaid bars and excess sole that has started to come off. In general his feet are extremely long and his frog and bulbs are very unhealthy, due to being lifted off the ground by those heels for who knows how long. Everyone here has given good advice. Do your best to find a reputable farrier and ideally a barefoot trimmer who can help you bring these hooves back to a healthy state. I'd highly recommend getting him out of shoes and into a pair of boots while he needs protection, but not before you find a trustworthy trimmer. No point fitting him for boots before he's got a good trim, because his foot is going to change drastically (for the better!).
Good luck and keep us posted.