Keep your pecker up
Remain cheerful - keep your head held high.
Whilst pecker is a word now associated with American slang the usage here is the English pecker, that is, nose or mouth, as opposed to the American, that is, penis. The phrase is equivalent to keep your chin up.
Check which country you are in before using this phrase.
The pecker is generally thought of as the mouth, although the earliest known use of the word in this phrase clearly alludes to the nose. The imagery is of a bird that pecks for food. That citation is from The Times, September 1845:
"Mr. King... misstated the fact in saying that he had put a piece of lighted paper to the master's nose while asleep in that house; it was his hot pipe that he applied to the sleeper's nostrils, at the same time crying: Come, old chap, keep your pecker up."