يَآ أَيَّتُهَا النَّفْسُ

يَآ أَيَّتُهَا النَّفْسُ is a phrase (شِبْهُ الجُمْلَةِ) consisting of a particle of calling, a particle of attention and a definite noun

PhraseParticle/Particle/NounNounParticleParticle
شِبْهُ الجُمْلَةِ حَرْفُ النِّدَآءِ وَحَرْفُ التَّنْبِيهِاسْمٌ مَعْرِفَةٌحَرْفُ التَّنْبِيهِحَرْفُ النِّدَآءِ
PhraseParticle, particle and definite noundefinite nounparticle of attentionparticle of calling 
  
O selfيَآ أَيَّتُهَا النَّفْسُ=النَّفْسُ+أَيَّتُهَا+يَا
 O selfself O
Surah/Below is the only verse in the holy Quran containing the compoundيَآ أَيَّتُهَا النَّفْسُ
Verse
89-27O the soul in rest and satisfactionيَآ أَيَّتُهَا النَّفْسُ المُطْمَئِنَّةُ