Your question is very thoughtful and quite difficult to answer (or at least it has an answer that may be difficult to accept).
Jesus’ disciples asked Jesus that exact question. In the gospel of John, chapter 9 we see the disciples asking Jesus why a man was born blind. I have copied some of the text out below so you can see the disciple’s question and Jesus’ reply for yourself, but if you have a bible it is best to read the whole chapter as well. The disciples call Jesus Rabbi which just means ‘teacher’. the text is about a blind man but it would be the same for any serious mental or physical deformity.
John Chapter 9 verses 1-3
The disciples assume that if the man had been born blind then either he or his parents must of sinned terribly. It reflected the common belief then (and now) that the circumstances of life were a direct result of sin. So they asked Jesus, who they knew understood God perfectly, how could this have happened. Jesus answers the question surprisingly, nobody had sinned to cause this - that is neither the man nor his parents were responsible. It was the disciples who had assumed it. (some eastern philosophies call this Karma - the idea if you do bad, bad things will happen if you do good, good things will happen). Jesus does give a reason for this man’s blindness - “this happened so that the work of God might be displayed in his life…....” - he is talking about this man specifically. Jesus goes on to heal the man and through the healing of the man demonstrates that he is in fact God in the flesh. This is what it means that God’s power might be displayed.
Yet the question remains what about all the other physical or mental deformities that happen to people at birth is Jesus going to do anything about them? The answer is yes and no.
The answer is no because in this life the majority of people born with a deformity will live like that for the rest of their life. It is the sad truth. Even though they have done nothing to deserve it they will suffer. This is not a direct result of their sin but is part and parcel of living in a sinful world.
You see when Adam and Eve disobeyed God in the Garden of Eden, God punished them. Part of that punishment was to subject all of Creation to “decay” (Romans chapter 8 verses 18-21). I see that much of the suffering and pain we see in the world is tied up with this. God did it not because he is vindictive but because he wants us to be reminded that there is more to life than just what we see around us. we suffer so that we will turn away from our rebellion and turn back to him so that we will not have to suffer the ultimate punishment on the last day. (This is what the apostle Paul is talking about in Acts chapter 17 verses 26-27). This is a difficult thing to grasp and accept - especially if you are the one suffering. But it is not the whole picture.
For Jesus has dealt with our suffering by suffering for us on the cross, paying the penalty for our rebellion and opening up the way for us to come back to God (see God Makes Sense. And when Jesus comes back he will give his followers new bodies that will be free of defects forever. That’s why Jesus healed the man born blind, he showed he is the one who has the power to remove suffering.
The great thing about following Jesus is that anyone can be a follower. God will accept anyone no matter their deformities, physical or psychological. All a person needs to do is trust Jesus’ died for there sins on the cross and follow him to the best of their abilities. We call this grace because forgiveness of our sins, our rejection of God is paid by Jesus, not by us, so it is a gift and therefore is open to anyone who wants it. God promises he will send his Holy Spirit to change those who are trying to follow Jesus to enable them to follow Jesus and when Jesus returns he can transform them completely making them like him, perfect in every way. So there is hope for the mentally and physically deformed, and that hope is Jesus.