I know it's an idiom and it has two and three meanings .But here I heard this as ' when I feel down and out before the scene , I have two bananas and I feel good.' So what is exact meaning here?
It's a bit of hyperbole or self-dramatization as used there. The speaker doesn't mean he's literally "down and out" (destitute and suffering), but merely feeling flat, listless, lacking energy.
It is quite common for people to use language with heightened, intensified expressions to express quite ordinary conditions. Example:
A. How are you today?
B. I'm just dead. I stayed up way too late last night. I could do that kind of thing in college, but now that I'm over 30 it just kills me.
Obviously B isn't really dead, or he wouldn't be talking. He's just being dramatic to bring home a point.
1(of a person) without money, a job, or a place to live; destitute. ‘a novel about being down and out in London’
Synonyms 2(of a boxer) knocked down and unable to continue fighting.
2.1 (of a competitor) facing certain defeat. ‘behind, away from home, and down to 14 men, Kelso ought to have been down and out, but Jeffrey rallied his men’
Out of money, without a home...
It could be referring to the second definition, a knockout in a boxing ring.
LINK This site says that the origin is from the boxing ring. This also is what I think.
In your sample, I think it is used badly. I believe the writer means that when they feel tired and less than happy and healthy, that bananas are a good pick me up.
In writing, we often see writers use literary license as a way of making the writing stand out or be more interesting. This sample, in my own opinion, fell short of the mark.