As mentioned in the question, the verses mentioned are
Surah Im'ran: Verse 146
And how many a prophet [fought and] with him fought many religious scholars. But they never lost assurance due to what afflicted them in the cause of Allah, nor did they weaken or submit. And Allah loves the steadfast.
and Surah Baqarah: Verse 214
Or do you think that you will enter Paradise while such [trial] has not yet come to you as came to those who passed on before you? They were touched by poverty and hardship and were shaken until [even their] messenger and those who believed with him said,"When is the help of Allah ?" Unquestionably, the help of Allah is near.
The question is that Surah Im'ran's verse mentions the fact that true believers and their prophets were not weakened when they faced adversities. However, Surah Baqarah mentions a slight counter-statement towards it by stating that prophets(together with their believers) were indeed shakened (which is natural considering the adversities they faced) and even got a "bit irresolute" when they cried out regarding the help of Allah. IMO both of these verses slightly contradict each other.
Am I missing any important context/commentary here?