i would guess that most people in prison are not able to write such upbeat, encouraging letters to people on the outside. But Paul knew that he had his Lord with him in all situations. And if God is with you, then you can still be happy. "Do not be anxious about anything, but in everything, by prayer and petition, with thanksgiving, present your requests to God. And the peace of God, which transcends all understanding, will guard your hearts and your minds in Christ Jesus." (Phil 2:6-7)
If we have Jesus, we can bear anything that comes against us. Remember the story of Joseph in the Old Testament? Joseph's jealous brothers sold him to traders in a traveling caravan passing by. Those traders sold him to Potiphar in Egypt to work in his house. Potiphar's wife tries to seduce Joseph. When Joseph refuses her, she cries "rape" and Joseph is put in prison. In all these situations, Scripture says, "And God was with him." Joseph not only survived, he thrived. He became the most powerful man in Egypt, second only to Pharaoh.
You too can not only survive, but thrive. No matter your present situation make your requests to God. Draw on his strength; rest in his presence in your life. Don't be anxious about anything for God is with you. Rejoice!