If you take this text outside of its context , it seems to stick out like a wrongfully placed appendage.  The other blessings in this pericope are based on virtues such as humility, mercy, meekness, peacekeeping and more.  But mourning?  How is someone dying in your life a blessing?  The Lord came to destroy death and hates it as much as anyone.

But context helps us to understand here.  Mourning isn’t given to death alone.  We can mourn many things and it is these other things I think Jesus is talking about.

The context is virtue.  So it would lead us to believe that the mourning here is about mourning unrighteousness.  At first it wouldn’t be hard to think it is bemoaning the evil in the world.  There’s plenty of it and plenty to mourn.  But this kind of mourning doesn’t need a special blessing attached to it.  This kind of mourning is good and important.  We should mourn unrighteousness in our world.  And there doesn’t need a blessing attached.

So really I think this mourning is the mourning of our own sins and our own unrighteousness.  Because indeed this kind of mourning can have an attached blessing – comfort.  Comfort because the Lord has addressed this through his salvation.  At this it would be a virtue to have the humility to recognize that what needs to be mourned in us.

So what it comes down to is righteous mourning.  And for that, God will provide His comfort.