Dewani, 34, appeared at Western Cape High Court today after receiving treatment at Valkenberg Hospital in Cape Town since April.
The millionaire businessman was extradited from the UK to face trial charged with conspiracy to commit kidnapping, robbery with aggravating circumstances, murder, kidnapping, and defeating the ends of justice.
His new wife Anni Dewani died when she was shot in the neck as the couple travelled in a taxi on the outskirts of Cape Town in November 2010.
Dewani, from Bristol, is accused of paying three men to kill her during the couple's honeymoon, which he denies.
A panel of three psychiatrists and a clinical psychologist will assess Dewani's mental health over 30 days, the court ruled.
The decision follows a report by psychiatrist Dr Sean Baumann which "differed in its opinion" to that of Professor Tuviah Zabow, who is acting on behalf of the defendant.
Dewani was detained ahead of his next court appearance on August 15. A provisional trial date was set for October 6.