What is the right defensive set-up for the King-Bishop_Rook trio in the diagrammed position? It's Black's move in the diagram.

In a recent correspondence game I managed to win an exchange at a cost of weakening my kingside a little bit. In the diagrammed position the g-pawn is missing and the White queen is lurking around. You also see the dark-squared bishop as a potentially aggressive resource for white. Seeing all of this coming my question was:

1. What are the right squares for the king?

2. Should I push my h-pawn to h6? (I will probably have to play e6 to protect f5, so, Bg5-f6 is a threat.

3. Do I put my rook on g-file? In the actual game I did, but that ended up smothering my king in the corner and for a long time to come gave tactical traps to my opponent.

Is there a general guide for how to defend such weakened structures? Like how to cover up for a missing h-pawn, or g-pawn, or f-pawn?

Thanks for your time.


[fen "5rk1/2q1ppbp/p1p5/2N1Pp2/8/2PP2Q1/P1P3PP/1rB2RK1 b - - 0 1"]

1...Qxe5 2. Qxe5 Bxe5 3. Nd7 Bxc3 4. Nxf8 Bd4+ 5. Kh1 Be3



FYI: I can't take on e5 due to the exchange followed by knight fork :(
You forgot to say who has the move in the given position. This is always important. 

For example, here if White has the move, he can attack with 1.Bh6, and he will be up a piece. 

So we can assume that Black has the move. 

In that case he had better play 1...Kh8 to avoid White's attack with 2.Bh6. This move also frees Black's bishop, so White should probably defend the pawn with 2.d4 and Black will probably need to play 2...Rg8. This already answers a couple of your questions (the king needs to go to h8, and the rook will go to g8). 

But I leave the other points to better players...