Why didn't Ban look for Elaine instead of staying in prison? In "The Seven Deadly Sins", after the Sins were branded as traitors and the holy knights took over, they each went their separate ways and into hiding. Ban was imprisoned eventually. He stayed there for years even though he could escape. He only got out when he got the word the Meliodas was out and looking for them.

Ever since he came out, he's been trying to look for a way to revive Elaine. I was wondering why he stayed in the prison for so long if he still had such an important thing to do. Why waste all that time when he could have looked for finding a way to revive her.
When Ban escapes from prison he explains that he allowed himself to be imprisoned because back then he craved pain.  This gave him, in a twisted way, pleasure but he grew tired of it. When he heard Meliodas was nearby, he escaped because following him would be more fun than being locked in a cell with bars through his limbs barely being fed.

It takes visiting the after life, having his team fight the resurrected Helbram, and fighting with Captain to decide to go out on his own to resurrect her.  He is obviously more than willing to take any opportunity to bring her back (even betraying his team) if he observes an opportunity.  This seems to indicate that he gave up for a while and did not pursue that goal because he did not know how to bring her back. He didn't seem to have a known way to bring her back but since going off on his own, he has started to search desperately.  I would expect he did the same before going to prison.

Keep in mind that, for an immortal man and long-lived fairies, 5 years isn't a very long time (even though it took much less time to fall for each other).  This was almost like taking a (pleasant?) vacation when he had no clear time constraint on his project despite it's obvious importance to him.  I would assume their was some guilty and self-contempt involved too.