Plans to demolish a former mental health unit at South Tyneside District Hospital have been given the green light.