James Rebhorn wrote his own obituary before he died.

The "Homeland" actor passed away on Friday at the age of 65 following a lengthy battle with skin cancer. At some point during his final days, he wrote a touching piece in which he paid tribute to his late parents, wife Becky and their daughters Hannah and Emma.

The full piece was first posted on the website for his church, St. Paul Lutheran Church in Jersey City, N.J.

In it, he praised his parents for giving him "faith and wisely (encouraging) him to stay in touch with God."

The obituary went on to describe James' wife and their children as the "centre of his being".

He wrote: "They anchored his life and gave him the freedom to live it. Without them, always at the centre of his being, his life would have been little more than a vapor.

"His children made him immensely proud. Their dedication to improving our species and making the world a better place gave him hope for the future. They deal with grief differently, and they should each manage it as they see fit. He hopes, however, that they will grieve his passing only as long as necessary."

And the "Scent of a Woman" star concluded the writing by thanking those who had helped with his career.

He closed: "Jim was fortunate enough to earn his living doing what he loved. He was a professional actor. His unions were always there for him, and he will remain forever grateful for the benefits he gained as a result of the union struggle. Without his exceptional teachers and the representation of the best agents in the business, he wouldn't have had much of a career.

"He was a lucky man in every way."