Time for headcanon again:
John isn’t mad that Sherlock jumped, he’s mad because Sherlock stopped *him* from killing himself (you don’t think Sherlock saw all he did on their first meeting and didn’t see suicidal tendencies??) but didn’t allow John to do the same.
He has spent most of his life living under an idea of how he was supposed to be/feel/act that depended mostly on the impressions from others (don’t we all?) and he didn’t know what to do about Sherlock. John never felt gay before but how do you explain loving someone so damn much? He hadn’t figured it out before Sherlock fell and when he came back, John had Mary - to whom he was about to propose and he wasn’t going to just drop her on Sherlock’s say-so (because he’s loyal and had the time to get close enough to her to form an actual relationship without anyone (Sherlock) interfering before it was set)
He cheated (texted) on Mary because it was a safe way to cheat. He wanted Sherlock but there was no way to make that casual and of no consequence but it didn’t give him the thrill he was looking for because he wasn’t unhappy (for certain values of happy) with Mary, he just wanted Sherlock too.
John has never been (never wanted to be) particularly introspective, he just wants a clear path. Sherlock has challenged everything he has ever thought or believed to be true about himself and how life works in general. That’s why he will follow him, without fail, and why he loves him so much.