In some cases these types of motivators can cause you to hack out something that only barely works at first, before circling back with test writing, best practices, etc. But maybe that can be better than not completing anything at all?
You can always refactor your way to an awesome codebase if it starts out a bit quick and dirty at first. Sometimes just having the minimum amount of friction to complete the requirements to get going can be helpful, as starting is sometimes the hardest part.
Maybe you just need to set deadlines as if you are the CEO of your company and not the developer where by certain dates you need the MVP or new feature and it has to happen no matter what.
Maybe build an MVP such that you can start charging people and get customers, which can also be a motivating force to continue on and continuously improve it because you feel the obligation to your paying customers.