YANBU
Ok so I don't know the background re the MH issues, but it is counter productive to shout at a already upset two year old. They just don't understand why you're shouting/ angry at them. The anger will just scare and upset the child further, and generlly just make things worse.
I would be upset too, but rather than worrying about what happened, perhaps it would be more constructive to decide how to deal with things now. Decide what to do next time your DS wakes up early and won't resettle. Perhaps reassurance that you will be there if he calls you will be enough to settle him, that and explaining that it is still bedtime and so he should still sleep. Explain that when it is time to wake up, you will pick him up for the day. I guess keeping him settled in his bed would be the key to him understanding that you won't pick him up to play/ cuddle etc when it is time to sleep. I wouldn't let a two year old cry to this extent (it instinctively felt wrong for you, or you wouldn't have posted here) this could cause trust/ security issues later on if it continues. A good strategy now, will hopefully prevent it escalating to sobbing and that level of upset again.
As for your DH, I guess he needs to understand how his behaviour made things worse, although he might be tired etc, he needs to be the adult here and understand that at his age your DS just doesn't rationalise things the way adults do. I accept that there may be other MH issues at play here, that still doesn't excuse his behaviour.
I'm sure other mumnetters will have lots more good advice and support for you, I hope you get this sorted and that your DS is smiling now.