While playing Skyrim, Redoran guards may say this to me "you think you have it bad? Try walking the bulwark at night". I take it that he means walking the bulwark at night is terrible even for a tough guy like me, but dictionary.com shows that "have it bad" means "To be very much in love". This doesn't make sense to me.
In this case, "have it bad" means to "be in a bad situation or position". (Dictionary.com is correct that there is another definition of the phrase, meaning "infatuated", but that's clearly not the right meaning here.)
In other words, "have it bad" is the exact opposite of "have it good", which is defined by Merriam-Webster as:
to be in a favorable position or situation
Other expressions that are similar in form are "have it easy", "have it hard", and "have it tough" (the last two are opposite to having it easy).
Your first thought is somewhat correct, the phrase meaning: "You think your life is difficult? Try walking the bulwark at night."
I think the difficulty in trying to find a source to support this stems from the phrase also being an idiom for "being very much in love." Because the former meaning is not an idiom, you aren't going to readily find information about that phrase.