I really cannot say very much about Srinivasa Ramanujan because I have never met him. Nor have I read what he wrote. I do not like to judge things I know virtually nothing about. I believe the Golden Rule of Jesus says I should be careful to judge. However, perhaps I can help you to reach your own decision about the question by providing a set of questions you can ask yourself or your friend who made this claim. These would be my questions: How do we know such mathematical knowledge came from this goddess? How do we know that this goddess is even real? What is the evidence? Are we to believe that the mathematical information came from this goddess simply because Mr. Ramanujan says so? What is his evidence? Why should we believe this?
Let me put it this way, unless I know a LOT more about this situation, I certainly do not see this as evidence that Hinduism is true. It seems to be hearsay evidence at best. I will let every person decide for him or herself.
I say it IS possible that Srinivasa Ramanujan has a mental problem, despite his great discoveries. Please do not get me wrong, I certainly am not saying he has such a psychological issue. In fact, there is the famous case of John Nash, who was one of the most brilliant mathematicians of the twentieth century. A movie was made about his life titled A Beautiful Mind. Mr. Nash suffered severely from mental illness. He was schizophrenic and lived an extremely troubled life. Yet, he was an incredibly productive genius in mathematics. The fact that one produces new and interesting mathematics does nothing to prove whether one has a mental problem and, as far as I am concerned, it also does nothing to prove Hinduism or any other religion for that matter. The fact that Galileo was a brilliant scientist and also a Christian does not support or prove the claims of Christianity.
Like I said, let every person decide for themselves, but the fact that Srinivasa Ramanujan is a brilliant mathematician tells me nothing, either about his sanity or about Hinduism.