While the infliction of torture does have several psychological implications it can be justified on moral grounds especially in ‘ticking bomb’ scenarios, where the information acquired could be used to save the lives of many others. In cases where the involvement of the suspect is certain and the suffering of the victim of the person is custody is greater, it is more like choosing the lesser of the two evils.
The limits and restrictions of UN convention against torture and inhuman treatment too is subject to interpretation as there are many ambiguities in its clauses. For instance the circumstances it cites are the ones which generally impact a larger population, like war, political instability, public emergency etc. Since these rights are designed to not interfere with the fundamental rights of the country its application remains relative and not absolute.