Before Mikami committed suicide, was he still having faith in Kira? At the end of Death Note, after Light is revealed as being Kira, Mikami goes on a little rant after their plan failed thanks to Near having switched the real Death Note. After that, however, Light denies knowing anything about Mikami.

After Light is shot several times by Matsuda Mikami then stabs himself with his pen, the fountain of blood and yelling grabs everyone's attention and as everyone goes to try to treat him, Light escapes.

However when Light denied knowing Mikami, Mikami looked depressed as if he had just been betrayed by his "god", but his suicide gives Light a distraction to flee.

So before Mikami committed suicide, was he still having faith in Kira?
He had a lot of faith in Kira. So much so that he was even willing to sacrifice himself because he considered Kira as "god". Like Kira, he also has a strong sense of justice to punish evil.

During the warehouse scene, he had complete faith in Kira's plan. He was 100% sure that Kira would succeed and reign as the "God of the New World". But as all viewers who have finished Death Note know, Near outsmarted Kira.

Near asked one of his colleagues, Gevanni, to replace the Death Note in Mikami's locker. Because Mikami had a very predictable schedule pattern, this in turn, was also the downfall of Kira.

Seeing Near outsmart him, Kira snapped and began to disown Mikami.
Showing his incapability to turn the situation, Mikami began to doubt Kira... that he was just indeed, Human.



Fun fact: Mikami's death is very different in the manga. In the anime, he was shown to stab himself with a pen and died of blood loss. In the manga, he was imprisoned and then suddenly died. Matsuda began to suspect that Near killed Mikami.

TL;DR: Mikami had 100% trust in Kira before the warehouse scene. Kira snapping out/disowning him/being unable to turn the situation made him lose faith in Kira.