If you truly understand that every suffering you are going through is a result of you not being in the nature of your mind, you will be able to see that others are going through the same suffering as you because of their ignorance and lack of understanding. Then compassion will come naturally, from realising this wisdom.