Salaams.. there isn't a formula to being an ideal husband or wife in that case, but there are ayats in which Allah (swt) describes what married life should be like for example:
"And among His Signs is this, that He created for you wives from among yourselves, that you may find repose in them, and He has put between you affection and mercy. Verily, in that are indeed signs for a people who reflect." Surah Ar Rum Verse 21.
This ayah amongst many show you that married life should be one of tranquillity because we have been created for each other in whom we find love and mercy. Married life should be one where you think of the other person and what pleases them and BOTH parties will try to do what makes their spouse happy. This will ferment love between themselves and mercy when things go wrong or mistakes are made.
Another example to look up and read about is the relationship between Khadijah (ra) and Muhammad (saw)... my post will be very long if I was to divulge into that relationship but please do read up on the wives of Muhammad (saw) and what their married life was like since they are our role model husband, wives, fathers and mothers.
Your brother in Islam