Yes, you can use a Section 8 Housing Choice Voucher to help pay your mortgage, but the housing authority that manages your voucher must participate in HUD's Homeownership Voucher Program.
This program operates just like the Section 8 program, only your voucher is used to pay your mortgage and other homeownership expenses.
Housing authorities may choose to participate in the Homeownership Voucher Program, but are not required to do so by HUD. From 2012-2017, 963 housing authorities nationwide have reported the use of a Homeownership Voucher. All states but Wyoming have at least one housing authority that has participated in the program, and many states have numerous participating housing authorities. Washington, DC, Puerto Rico, US Virgin Islands, and Guam have participating housing authorities as well. A spreadsheet of these housing authorities can be found here, in the link titled "MS-Excel file" under the section "Do all PHA's participate in this program?"
Expenses that may be assisted by your voucher include:
Homeownership Voucher participants must already have a Section 8 Housing Choice Voucher. If you don't currently have a Section 8 Voucher, you would first need to obtain one by applying to an open waiting list through the housing authority that serves your area of interest.